Received: from localhost (wm.hub.org [200.46.204.128]) by postgresql.org (Postfix) with ESMTP id AF7E39FB2F6 for ; Fri, 27 Oct 2006 23:38:42 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.128]) (amavisd-new, port 10024) with ESMTP id 68567-03 for ; Sat, 28 Oct 2006 02:38:20 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey- Received: from vms040pub.verizon.net (vms040pub.verizon.net [206.46.252.40]) by postgresql.org (Postfix) with ESMTP id C86709FA2AB for ; Fri, 27 Oct 2006 23:38:20 -0300 (ADT) Received: from [192.168.7.5] ([71.101.15.194]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J7T00E94RBFE2L5@vms040.mailsrvcs.net> for pgsql-sql@postgresql.org; Fri, 27 Oct 2006 21:38:04 -0500 (CDT) Date: Fri, 27 Oct 2006 22:38:52 -0400 From: Joe Subject: Re: Case Preservation disregarding case sensitivity? In-reply-to: <200610271623.37525.beauh@bluefrogmobile.com> To: beau hargis Cc: pgsql-sql@postgresql.org Message-id: <1162003132.687.8.camel@pampa> Organization: Freedom Circle, LLC MIME-version: 1.0 X-Mailer: Evolution 2.8.1.1 FreeBSD GNOME Team Port Content-type: text/plain Content-transfer-encoding: 7bit References: <200610271623.37525.beauh@bluefrogmobile.com> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests= X-Spam-Level: X-Archive-Number: 200610/227 X-Sequence-Number: 26616 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