BUG #4047: case preserve for columns

From: "Eugen Konkov" <Eugen(dot)Konkov(at)aldec(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #4047: case preserve for columns
Date: 2008-03-21 14:44:52
Message-ID: 200803211444.m2LEiqu9040693@wwwmaster.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


The following bug has been logged online:

Bug reference: 4047
Logged by: Eugen Konkov
Email address: Eugen(dot)Konkov(at)aldec(dot)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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message John R Pierce 2008-03-21 15:09:38 Re: BUG #4047: case preserve for columns
Previous Message Tom Lane 2008-03-20 15:30:32 Re: BUG #4044: Incorrect RegExp substring Output