Re: TODO question

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Pavlo Baron" <pb(at)pbit(dot)org>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: TODO question
Date: 2001-12-29 16:54:39
Message-ID: 18847.1009644879@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Pavlo Baron" <pb(at)pbit(dot)org> writes:
> I see. Can I say in simple words, that everything that can be parsed without
> any knowledge about the database condition has to be pre-parse-analized and
> the rest has to be post-parse-analized, then?

Exactly. The grammar phase has to operate without examining the
database, because it needs to be able to run even in transaction-aborted
state (so we can recognize COMMIT and ROLLBACK commands). Parse
analysis does the lookups and so forth to determine exactly what the
raw syntax tree really means.

> summary (if any) where I would find a rough desc. on such distinction?

There's no substitute for reading the code ... the point above is
mentioned in the comments at the head of gram.y, for example.

> BTW, what about constructs like:
> INSERT INTO foo VALUES (1,,2);
> wouldn't it make the whole thing a bit simpler?

Maybe, but it's not SQL92. Looks kind of error-prone to me anyway.

regards, tom lane

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Lockhart 2001-12-29 18:55:55 Updated date/time parsing
Previous Message Bruce Momjian 2001-12-29 16:54:09 Re: text -> time cast problem