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
In response to
pgsql-hackers by date
|Next:||From: Albe Laurenz||Date: 2011-11-30 15:23:16|
|Subject: Re: review: CHECK FUNCTION statement|
|Previous:||From: Andrew Dunstan||Date: 2011-11-30 14:35:41|
|Subject: Re: Reserved words and delimited identifiers|