Re: create table bug with reserved words?

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Chris Storah <cstorah@emis-support.demon.co.uk>, pgsql-bugs@postgresql.org
Date: 2001-02-16T17:11:34Z
Lists: pgsql-bugs
Peter Eisentraut <peter_e@gmx.net> writes:
> But since the problematic word in your case is not CALL but SELECT, I can
> tell you right away with relative certainty that it will not be possible
> to change the parser to accept SELECT as an identifier in all contexts
> without butchering the grammar beyond reason.

You can drop the "without" qualifier ;-) --- it's not possible period.
Counterexample:

		SELECT (SELECT (3)) FROM foo;

Is the second SELECT a (rather vacuous) sub-select, or is it a call of a
function named SELECT?

If you've got a really strong urge to use some keyword as an identifier,
that's what double quotes are for.  But the SQL syntax does require a
lot of keywords to be reserved.  I believe that we are actually more
permissive in this respect than the SQL spec expects us to be.

			regards, tom lane