Skip site navigation (1) Skip section navigation (2)

Re: column headers all in upper-case letters?

From: Frank Bax <fbax(at)sympatico(dot)ca>
To: "Sammer Reinhard J(dot)" <RSammer(at)mlink(dot)co(dot)at>
Cc: "'pgsql-novice(at)postgresql(dot)org'" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: column headers all in upper-case letters?
Date: 2002-01-31 20:15:37
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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);
	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(at)postgresql(dot)org where you'll
find people who know more about jdbc.


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);
>> 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

In response to

pgsql-novice by date

Next:From: Sammer Reinhard J.Date: 2002-02-01 10:15:09
Subject: Re: column headers all in upper-case letters?
Previous:From: Sammer Reinhard J.Date: 2002-01-31 18:27:06
Subject: Re: column headers all in upper-case letters?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group