From: | Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com> |
---|---|
To: | Christian Sell <christian(dot)sell(at)netcologne(dot)de> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: PG case sensitivity |
Date: | 2004-09-14 14:19:17 |
Message-ID: | 20040914071605.S11242@megazone.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, 14 Sep 2004, Christian Sell wrote:
> Hello,
>
> I am running into a problem with PGs case sensitivity with regard to column and
> table names. I am using program components that require the object names
> returned from database metadata queries to be in uppercase. Therefore, I am
> forced to use double quotes in the table creation scripts, like
>
> create table "BLA" ();
>
> However, after doing that, all scripts that reference objects without quotes
> fail, as PG seems to internally translate to lowercase in the absence of
> quotes. I am forced to touch each and every column and table name in every
> script. Questions:
>
> 1) can PG be configured to operate case insensitive?
> 2) why in the world was case sensitivity introduced at all? AFAIK, the SQL
> standard explicitly states that names are case insensitive, and it seems to me
> that PG goes against that standard. In fact, if there is no solution to this
No, the SQL spec says that names are case folded to uppercase, although we
currently case-fold to lowercase (and can't really wholesale change that
for backwards compatibility reasons). There's been talk about supporting a
mode which case folds the other direction. In general, however, mixing
quoted and unquoted names is dangerous in all complient databases, because
in none would "Bla" and bla or BLA be the same name.
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2004-09-14 14:26:19 | Re: Rollback on Error |
Previous Message | Harald Fuchs | 2004-09-14 14:10:19 | Re: PG case sensitivity |