Re: Column name case conversion - Mailing list pgsql-general

From Stephan Szabo
Subject Re: Column name case conversion
Date
Msg-id Pine.BSF.4.10.10009081715450.99939-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: Column name case conversion  (Zeljko Trogrlic <zeljko@technologist.com>)
List 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 by date:

Previous
From: Stephan Szabo
Date:
Subject: Re: race conditions, intersect in subqueries
Next
From: "Rommel B. Abaya"
Date:
Subject: port from MSSQLServer to PostgreSQL