Re: Reserved words and delimited identifiers - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Reserved words and delimited identifiers
Date
Msg-id CA+Tgmob7gaErynZxMMy4sfs-ffN-tCzy_j=4HWYZJ1d2tLOJkQ@mail.gmail.com
Whole thread Raw
In response to Reserved words and delimited identifiers  (Joe Abbate <jma@freedomcircle.com>)
Responses Re: Reserved words and delimited identifiers  (Joe Abbate <jma@freedomcircle.com>)
Re: Reserved words and delimited identifiers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Tue, Nov 29, 2011 at 7:29 PM, Joe Abbate <jma@freedomcircle.com> wrote:
> It seems to me that since a TYPE in a column definition or function
> argument can be a non-native TYPE, it could be a reserved word and
> therefore it should always be allowable to quote the TYPE.  Can someone
> please explain why that is not the case?

Type names as they appear in pg_type.typname can always be quoted.
But some types, like int4, have alternate names - e.g. int4 can be
specified as integer or int, and foat8 can be specified using the
two-word phrase double precision.  These alternate names are keywords
when unquoted, but identifiers (with a different meaning) when quoted.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Patch - Debug builds without optimization
Next
From: Robert Haas
Date:
Subject: Re: DOMAINs and CASTs