Re: Upper / lower cases on table and column names

From: Achilleus Mantzios <achill(at)matrix(dot)gatewaynet(dot)com>
To: Reiner Dassing <dassing(at)wettzell(dot)ifag(dot)de>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Upper / lower cases on table and column names
Date: 2002-10-25 12:51:26
Message-ID: Pine.LNX.4.44.0210251547360.11887-100000@matrix.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, 25 Oct 2002, Reiner Dassing wrote:

> (PostgreSQL) 7.1.1:
>
> Hello all!
>
> I was trying to adopt a database application to PostgreSQL.
> (It is written for MySQL and Oracle using perl)
>
> During this process I recognized the phenomena that upper case letters
> of table names and column names are not preserved
> in PostgreSQL.
> Is this a "featue" of PostgreSQL or do I miss something?

Both :)

You may double quote the literals of names in pgsql,
but then in every statement you must retain the double quotes,
which is annoying.
Change the table name to something more meaningful.

>
> Example:
> Id and textId as a column name should conserve upper case letters 'I'
> but \d data converts it to lower case words:
>
> psql ...
> create table data ( Id int not null, textId int not null);
>
> \d data
> Table "data"
> Attribute | Type | Modifier
> -----------+---------+----------
> id | integer | not null
> textid | integer | not null
>
> and
> create table Data ( Id int not null, textId int not null);
>
> results in:
> ERROR: Relation 'data' already exists
>
> In the interpretation of my application table 'data' and 'Data' is something
> different.
>
> --
> --
> Mit freundlichen Gruessen / With best regards
> Reiner Dassing
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

==================================================================
Achilleus Mantzios
S/W Engineer
IT dept
Dynacom Tankers Mngmt
Nikis 4, Glyfada
Athens 16610
Greece
tel: +30-10-8981112
fax: +30-10-8981877
email: achill(at)matrix(dot)gatewaynet(dot)com
mantzios(at)softlab(dot)ece(dot)ntua(dot)gr

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Tim Perdue 2002-10-25 13:33:00 Foreign character struggles
Previous Message Stephan Szabo 2002-10-25 12:48:59 Re: Upper / lower cases on table and column names