From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Joe Abbate <jma(at)freedomcircle(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Reserved words and delimited identifiers |
Date: | 2011-11-30 14:55:18 |
Message-ID: | 9768.1322664918@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andrew Dunstan <andrew(at)dunslane(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2011-11-30 15:23:16 | Re: review: CHECK FUNCTION statement |
Previous Message | Andrew Dunstan | 2011-11-30 14:35:41 | Re: Reserved words and delimited identifiers |