BUG #4047: case preserve for columns

Поиск
Список
Период
Сортировка
От Eugen Konkov
Тема BUG #4047: case preserve for columns
Дата
Msg-id 200803211444.m2LEiqu9040693@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #4047: case preserve for columns  (John R Pierce <pierce@hogranch.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: BUG #4044: Incorrect RegExp substring Output
Следующее
От: John R Pierce
Дата:
Сообщение: Re: BUG #4047: case preserve for columns