Re: Upper / lower cases on table and column names

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(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:48:59
Message-ID: 20021025054139.C34720-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Achilleus Mantzios 2002-10-25 12:51:26 Re: Upper / lower cases on table and column names
Previous Message Reiner Dassing 2002-10-25 12:16:07 Upper / lower cases on table and column names