"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
pgsql-hackers by date
|Next:||From: Thomas Lockhart||Date: 2001-12-29 18:55:55|
|Subject: Updated date/time parsing|
|Previous:||From: Bruce Momjian||Date: 2001-12-29 16:54:09|
|Subject: Re: text -> time cast problem|