Re: column headers all in upper-case letters? - Mailing list pgsql-novice

From Frank Bax
Subject Re: column headers all in upper-case letters?
Date
Msg-id 3.0.6.32.20020131151537.01f25600@pop6.sympatico.ca
Whole thread Raw
In response to Re: column headers all in upper-case letters?  ("Sammer Reinhard J." <RSammer@mlink.co.at>)
List pgsql-novice
I don't understand.  In your initial message, you asked:
>I want that a 'select * from test;'
>returns 'ID' not 'id' as column header.

In my response, I showed by example that if you create a table using:
    create table test ("ID" int);
then
    select * from test;
will indeed return 'ID' and not 'id' as the column header.

And yet you appear to remain unsatified?  Why?  Perhaps we need to know why
is it so important that the column header is returned in upper-case?  If
your SQL statements are written completely in upper-case, but without
double-quotes, they will still work with lower-case column and table names.

If you see different behaviour using the jdbc interface, then perhaps your
query should be directed to pgsql-interfaces@postgresql.org where you'll
find people who know more about jdbc.

Frank


At 07:27 PM 1/31/02 +0100, Sammer Reinhard J. wrote:
>> Sorry, I made a type in my previous example; so that it does not
>> demonstrate my point properly/clearly.  It's subtle, look for it the
>> 'create' statement and last select example.
>
>First, thank you.
>
>>
>> By default, Postgresql will convert all table and column
>> names to lower
>> case; both when you are creating the table and in sql
>> statements that it
>> processes.  To override this, the table and column names must
>> be enclosed
>> in double quotes, both when the table is created and in all
>> subsequent sql
>> statements.
>>
>> fbax=# create table test ("ID" int, ID int);
>> CREATE
>> fbax=# insert into test values(1,2);
>> INSERT 6096748 1
>
>sorry for quoting myself:
>> >I am looking for a server or driver side configuration option
>> >as I don't want to rewrite all my SQL statements (>3500).
>
>I'm using jdbc org.postgresql.Driver jdbc7.1-1.2.jar with a 7.1.3 DB


pgsql-novice by date:

Previous
From: Tom Lane
Date:
Subject: Re: problem query ...
Next
From: "Sammer Reinhard J."
Date:
Subject: Re: column headers all in upper-case letters?