Re: BUG #4047: case preserve for columns

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Eugen(dot)Konkov(at)aldec(dot)com
Cc: "John R Pierce" <pierce(at)hogranch(dot)com>, pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #4047: case preserve for columns
Date: 2008-03-21 16:43:29
Message-ID: 25140.1206117809@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

<Eugen(dot)Konkov(at)aldec(dot)com> writes:
> It is have no any matter to me if it is upshifted or lowershifted on server
> sidethe standard does not specify that output of queries MUST be
> lowershifted/upshifted.

Yes it does. I quote SQL92 section 5.2 syntax rule 10:

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 equiva-
lence, representation in the Information and Definition Schemas,
representation in the diagnostics area, and similar uses.

In particular "representation in the diagnostics area" would include the
case of column headings being returned to the client.

If you don't want case folding to happen, you need to use a quoted
identifier. In the example you showed,

SELECT "Id" AS ID, ...

it would have been sufficient to leave off the AS clause.

regards, tom lane

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Eugen.Konkov 2008-03-21 16:53:34 Re: BUG #4047: case preserve for columns
Previous Message Eugen.Konkov 2008-03-21 15:54:59 subscribe