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.20020131105347.02119100@pop6.sympatico.ca
Whole thread Raw
In response to Re: column headers all in upper-case letters?  ("Sammer Reinhard J." <RSammer@mlink.co.at>)
Responses Re: column headers all in upper-case letters?
List pgsql-novice
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
fbax=# select * from test;
 ID | id
----+----
  1 |  2
(1 row)

fbax=# select "ID" from test;
 ID
----
  1
(1 row)

fbax=# select id from test;
 id
----
  2
(1 row)

Frank

At 03:32 PM 1/31/02 +0100, Sammer Reinhard J. wrote:
>> SELECT id AS "ID" FROM test
>>
>> but why??
>
>sorry, I was not precise.
>
>I am looking for a server or driver side configuration option
>as I don't want to rewrite all my SQL statements (>3500).
>
>I am porting an application running on MsSQL/Oracle DBs.
>
>>> Could you please point me to the fine document where I can
>>> information
>>> regarding:
>>>
>>> Is there a way to force PostgreSQL or the jdbc Driver to
>>> return column
>>> headers all in upper-case letters?
>>>
>>> e.g. table test with column ID type int:
>>> I want that a 'select * from test;' returns 'ID' not 'id' as
>>> column header.

pgsql-novice by date:

Previous
From: Alexander Pucher
Date:
Subject: Query size of large object
Next
From: Frank Bax
Date:
Subject: Re: column headers all in upper-case letters?