Re: Column name case conversion

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: Column name case conversion
Дата
Msg-id Pine.BSF.4.10.10009081715450.99939-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: Column name case conversion  (Zeljko Trogrlic <zeljko@technologist.com>)
Список pgsql-general
Sorry I didn't respond sooner -- lost the thread. :(

Yeah, I can see where you're seeing this now.  Not so much
in the queries as in the code that needs to access the
results.

Your suggestion would work (theoretically the server could do
something similar in reverse (store a real name and lower cased
name for comparison))  Although, it might cause some wierdness
with quoted identifiers then...
Imagining someone with ID and "ID" and how that would interact
and how to not break the backward compatibility.

On Tue, 5 Sep 2000, Zeljko Trogrlic wrote:

> Let's say you select * from table where ID = 1
> Then you want to put all column name/value pairs into HashMap:
>
> for (int columnNo = 1; columnNo <= md.getColumnCount(); ++columnNo) {
>  String  name = md.getColumnName(columnNo);
>  map.put(name, rs.getObject(columnNo));
> }
>
> And later you want to retrieve that value:
> map.get("ID");
>
> You system fails because you got null value. The only solution I can think
> of is to use toUpper for keys and to store column names separately, if
> needed for update.



В списке pgsql-general по дате отправления:

Предыдущее
От: Stephan Szabo
Дата:
Сообщение: Re: race conditions, intersect in subqueries
Следующее
От: "Rommel B. Abaya"
Дата:
Сообщение: port from MSSQLServer to PostgreSQL