Re: Reserved words and delimited identifiers

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Reserved words and delimited identifiers
Дата
Msg-id 9768.1322664918@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Reserved words and delimited identifiers  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: Reserved words and delimited identifiers  (Joe Abbate <jma@freedomcircle.com>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> On 11/30/2011 09:02 AM, Alvaro Herrera wrote:
>> I wonder if it would simpler to just not quote type names except when
>> absolutely necessary.

> Yeah, and very much less ugly. Ploughing through masses of unnecessary 
> quotes is they way to a headache. quote_ident() gets this right.

But, per this discussion, you can't just blindly apply quote_ident to a
type name, because it may not *be* an identifier.

One possible solution, if you're getting type information about columns
from the server, is to cast the type OID to regtype and let the regtype
output converter make all the decisions.  It's less notation than a join
to pg_type anyway.
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Reserved words and delimited identifiers
Следующее
От: "Albe Laurenz"
Дата:
Сообщение: Re: review: CHECK FUNCTION statement