Re: create table bug with reserved words?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: Chris Storah <cstorah(at)emis-support(dot)demon(dot)co(dot)uk>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: create table bug with reserved words?
Date: 2001-02-16 17:11:34
Message-ID: 12335.982343494@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Peter Eisentraut <peter_e(at)gmx(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Chris Storah 2001-02-16 17:16:56 RE: create table bug with reserved words?
Previous Message Peter Eisentraut 2001-02-16 16:33:31 RE: create table bug with reserved words?