Re: Reserved words and delimited identifiers

Поиск
Список
Период
Сортировка
От Joe Abbate
Тема Re: Reserved words and delimited identifiers
Дата
Msg-id 4ED5BBDD.4080005@freedomcircle.com
обсуждение исходный текст
Ответ на Re: Reserved words and delimited identifiers  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Reserved words and delimited identifiers  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-hackers
On 11/29/2011 11:41 PM, Tom Lane wrote:
> Another way to say that is that the type int4 can be specified in two
> ways:
> 
>     int4        (an identifier)
>     INTEGER        (a keyword)
> 
> Quoting "int4" is no problem, because it's still an identifier, but
> quoting "integer" takes away its keyword nature, so it doesn't get
> recognized.
> 
> The fact that INTEGER is a keyword, and not an identifier, is per SQL
> specification.  We could perhaps hack things so that "integer" as an
> identifier would also work, but I doubt that we'd go so far as to make
> "INTEGER" (a different identifier) also work, and we'd certainly not
> be able to do much about the spec's more exciting deviations from
> identifier-looking type names, such as CHARACTER VARYING or DOUBLE
> PRECISION.
> 
> Or to put it more pithily: the SQL committee's ideas of good syntax
> seem to have been frozen around the time COBOL was invented.

Thanks Tom and Robert.  I think I understand the problem now.  I guess
I'll have to work around this "quirk" by dealing specially with type
names and not quote them when they're in the shorter list of SQL
Standard reserved words.

Joe


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Reserved words and delimited identifiers
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Reserved words and delimited identifiers