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

From Eugen Konkov
Subject BUG #4047: case preserve for columns
Date
Msg-id 200803211444.m2LEiqu9040693@wwwmaster.postgresql.org
Whole thread Raw
Responses Re: BUG #4047: case preserve for columns
List pgsql-bugs
The following bug has been logged online:

Bug reference:      4047
Logged by:          Eugen Konkov
Email address:      Eugen.Konkov@aldec.com
PostgreSQL version: 8.3
Operating system:   Windows XP
Description:        case preserve for columns
Details:

1)
SELECT Id FROM MYTABLE;
$sth= fetchall_hashref()
expected: $sth->[i]{Id}
actual: $sth->[i]{id}

2)
SELECT "Id" as ID FROM MYTABLE;
$sth= fetchall_hashref()
expected: $sth->[i]{ID}
actual: $sth->[i]{id}

How ask postgre preserve column names as I query them?
This is a VERY, VERI BIG issue if I need quote all those as:
a) SELECT "Id" FROM MYTABLE;
b) SELECT "Id" as "ID" FROM MYTABLE;
Because of I need by hand quote of 100K queries
But very difficult will be to deal with dinamically generated queries.

Father more "Id" mysql count as string and not field name. So ported to
PostgreSQL queries is not compatible back with MySQL =(

Is there any workaround other then quoting to get working 1) and 2) as
expected?

thanks

PS. other discussion:
http://www.issociate.de/board/post/10327/Case_insensitivity_in_column_and_ta
ble_names.html

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #4044: Incorrect RegExp substring Output
Next
From: John R Pierce
Date:
Subject: Re: BUG #4047: case preserve for columns