Re: Upper / lower cases on table and column names - Mailing list pgsql-sql

From Stephan Szabo
Subject Re: Upper / lower cases on table and column names
Date
Msg-id 20021025054139.C34720-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Upper / lower cases on table and column names  (Reiner Dassing <dassing@wettzell.ifag.de>)
List pgsql-sql
On Fri, 25 Oct 2002, Reiner Dassing wrote:

> 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?

There's some question about whether it should instead fold to upper
case, but in any case its a sort of cheat to handle the case
insensitivity of regular identifiers.

> create table data ( Id int not null, textId int not null);
> 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.

AFAICT it shouldn't be.  SQL92 basically says that two regular identifiers
are the equivalent if the identifer bodies compare equally.  The
identifier bodies of a regular identifier are equivalent to an identifier
body in which each lower-case character is replaced with an upper case
one.



pgsql-sql by date:

Previous
From: Achilleus Mantzios
Date:
Subject: Re: Upper / lower cases on table and column names
Next
From: Tim Perdue
Date:
Subject: Foreign character struggles