Re: Case Preservation disregarding case sensitivity?

From: Joe <dev(at)freedomcircle(dot)net>
To: beau hargis <beauh(at)bluefrogmobile(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: Case Preservation disregarding case sensitivity?
Date: 2006-10-28 02:38:52
Message-ID: 1162003132.687.8.camel@pampa
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-sql

Hi Beau,

On Fri, 2006-10-27 at 16:23 -0700, beau hargis wrote:
> I am hoping that there is an easy way to obtain case-preservation with
> case-insensitivity, or at the very least, case-preservation and complete
> case-sensitivity, or case-preservation and a consistant case-conversion
> strategy.
>
> The case of the column names need to be preserved because that is the way the
> schema is designed and most importantly (VERY, VERY IMPORTANT), column names
> are used in apps as hash values, or as named references which are case
> sensitive and as such need to be delivered to the client in exactly in the
> manner specified at the time of table creation.
>
> Again, I am looking for a way (magic, patches, whiskey, etc) that will give me
> case-preservation with EITHER case-sensitivity OR case-insensitivity, but not
> both as I am seeing.
>
> Thanks in advance. I am hoping to find a solution to this so I can actually
> convert one of our databases to use Postgres. And I can say that little
> issues like this are precisely why Postgres was never used in this
> organization before, even though several of the other database developers
> like the features, stability and performance of Postgres.

I went through the same issue in my conversion from MySQL to Postgres
and (since I had a small application) I ended up changing up all my
tables and columns "UserProfile" to user_profile.

I'm afraid however, that it's MySQL that is the odd man out. I haven't
researched this completely but I believe PG follows either the FIPS-127
or SQL-92 standard with respect to what are called "delimited
identifiers". Basically, this says if you want case sensitivity in
identifier names, you have to use double quotes wherever you refer to
the identifier. Without the double quotes, the SQL implementor can
either use UPPERCASE (as I believe Oracle and DB2 do) or lowercase (as
PG does) when it displays those identifiers.

Joe

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jonah H. Harris 2006-10-28 05:27:07 PGFoundry down?
Previous Message Frank Bax 2006-10-28 01:50:22 Re: Case Preservation disregarding case sensitivity?

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Broersma Jr 2006-10-28 04:09:35 Re: How to query information schema from shell script
Previous Message Frank Bax 2006-10-28 01:50:22 Re: Case Preservation disregarding case sensitivity?