Re: case dumbiness in return from functions - Mailing list pgsql-general

From Tom Lane
Subject Re: case dumbiness in return from functions
Date
Msg-id 10491.1200677938@sss.pgh.pa.us
Whole thread Raw
In response to Re: case dumbiness in return from functions  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Actually I think the standard mandates case-folding (though to upper
> case rather than lower, i.e. the other way around)

That's how I read it too.  SQL99 5.2 saith

        22) The case-normal form of the <identifier body> of a <regular
            identifier> is used for purposes such as and including
            determination of identifier equivalence, representation in
            the Definition and Information Schemas, and representation in
            diagnostics areas.

            NOTE 44 - Any lower-case letters for which there are no upper-
            case equivalents are left in their lower-case form.

        23) The <identifier body> of a <regular identifier> is equivalent
            to an <identifier body> in which every letter that is a lower-
            case letter is replaced by the equivalent upper-case letter or
            letters. This treatment includes determination of equivalence,
            representation in the Information and Definition Schemas,
            representation in the diagnostics area, and similar uses.

In particular this appears to me to specifically require that column
names returned by a SELECT be case-normalized, which is what the OP
would like us to not do.

            regards, tom lane

pgsql-general by date:

Previous
From: gordan@bobich.net
Date:
Subject: Re: Replication Using Triggers
Next
From: Tom Lane
Date:
Subject: Re: transactionid lock type?