Re: BUG #4047: case preserve for columns - Mailing list pgsql-bugs

From
Subject Re: BUG #4047: case preserve for columns
Date
Msg-id 005c01c88b74$1b6aa420$1200a8c0@kharkov.localhost
Whole thread Raw
In response to BUG #4047: case preserve for columns  ("Eugen Konkov" <Eugen.Konkov@aldec.com>)
List pgsql-bugs
SELECT "Id" AS ID
and this will return 'id' instead of 'ID'

may be is there server configurations variable to be case sensitive?
or return case preserved field names?
or may be I compile manually PostgreSQL to do that?

Because typing SELECT "Id" AS "ID" instead of SELECT ID is boring
else more your variant is less readable

If there no any way to migrate to PostgreSQL without changes application
it seems not good database because of it will too expensive for us to
migrate to (((


----- Original Message -----
From: "Tom Lane" <tgl@sss.pgh.pa.us>
To: <Eugen.Konkov@aldec.com>
Cc: "John R Pierce" <pierce@hogranch.com>; <pgsql-bugs@postgresql.org>
Sent: Friday, March 21, 2008 6:43 PM
Subject: Re: [BUGS] BUG #4047: case preserve for columns


> <Eugen.Konkov@aldec.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

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #4047: case preserve for columns
Next
From: "IP"
Date:
Subject: BUG #4048: Can't install pltcl