Skip site navigation (1) Skip section navigation (2)

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: (view raw, whole thread or download thread mbox)
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

pgsql-hackers by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group