Re: [HACKERS] 6.4 and reserved word USER... - Mailing list pgsql-hackers

From Thomas G. Lockhart
Subject Re: [HACKERS] 6.4 and reserved word USER...
Date
Msg-id 3637FE0C.B494C7F6@alumni.caltech.edu
Whole thread Raw
In response to Re: [HACKERS] 6.4 and reserved word USER...  (The Hermit Hacker <scrappy@hub.org>)
List pgsql-hackers
> > the word "USER" has been reserved now.
> > SO my question is this:  Is there anything else that could  be done 
> > to make this work?

Not that this helps you much, "USER" is an SQL92 reserved word. There is
a new chapter in the User's Guide on syntax which shows lists of the
reserved and unreserved words in SQL92, SQL3, and/or Postgres to help
people avoid trouble.

You can do your queries like
 SELECT "user" from table...

to keep using that column name, but it would still require you to find
and change all of the instances in your apps. I assume that adding the
ColId definition of USER in gram.y resulted in massive numbers of
shift/reduce conflicts? If not, then we should just put it in there, but
I can't see why you wouldn't get the shift/reduce problems since it
would be allowed the same places as CURRENT_USER/USER are.
                    - Tom


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Post-mortem: Another bug in pg_operator.h
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Another bug in pg_operator.h