Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id EC0069F9B32; Wed, 15 Nov 2006 13:59:05 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 31057-10; Wed, 15 Nov 2006 13:58:58 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- X-Greylist: from auto-whitelisted by SQLgrey- Received: from community1.commandprompt.com (host-130.commandprompt.net [207.173.203.130]) by postgresql.org (Postfix) with ESMTP id 7BB2D9F946B; Wed, 15 Nov 2006 13:58:57 -0400 (AST) Received: from [192.168.27.150] ([12.38.10.44]) (authenticated bits=0) by community1.commandprompt.com (8.13.5.20060308/8.13.5/Debian-3ubuntu1.1) with ESMTP id kAFHwGvw032428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Wed, 15 Nov 2006 09:58:22 -0800 Message-ID: <455B5537.3060905@dunslane.net> Date: Wed, 15 Nov 2006 12:58:15 -0500 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.0.6) Gecko/20060804 Fedora/1.0.4-0.5.1.fc5 SeaMonkey/1.0.4 MIME-Version: 1.0 To: Jim Nasby CC: Simon Riggs , Tom Lane , Chuck McDevitt , Stephan Szabo , beau hargis , pgsql-sql@postgresql.org, pgsql-hackers@postgresql.org Subject: Re: [SQL] Case Preservation disregarding case References: <200610271623.37525.beauh@bluefrogmobile.com> <1162003132.687.8.camel@pampa> <200610301928.51255.beauh@bluefrogmobile.com> <23177.1162265010@sss.pgh.pa.us> <24861.1162276496@sss.pgh.pa.us> <20061031101314.R83230@megazone.bigpanda.com> <14059.1162363105@sss.pgh.pa.us> <1162463264.3587.281.camel@silverbirch.site> <16897.1162482685@sss.pgh.pa.us> <1163540553.27956.109.camel@silverbirch.site> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200611/348 X-Sequence-Number: 93810 Jim Nasby wrote: > On Nov 14, 2006, at 2:42 PM, Simon Riggs wrote: >> On Thu, 2006-11-02 at 10:51 -0500, Tom Lane wrote: >>> "Simon Riggs" writes: >>>> We have namespaces to differentiate between two sources of object >>>> names, >>>> so anybody who creates a schema where MyColumn is not the same >>>> thing as >>>> myColumn is not following sensible rules for conceptual distance. >>> >>> I'd agree that that is not a good design practice, but the fact remains >>> that they *are* different per spec. >>> >>>> Would be better to make this behaviour a userset >>>> switchable between the exactly compliant and the more intuitive. >>> >>> That's certainly not happening --- if you make any changes in the >>> semantics of equality of type name, it would have to be frozen no >>> later than initdb time, for exactly the same reasons we freeze >>> locale then (hint: index ordering). >> >> [Re-read all of this after Bruce's post got me thinking.] >> >> My summary of the thread, with TODO items noted: >> >> 1. PostgreSQL doesn't follow the spec, but almost does, with regard to >> comparison of unquoted and quoted identifiers. DB2 does this per spec. >> >> 2. TODO: We could follow the spec, but it would need an initdb option; >> some non-SQL:2003 standard PostgreSQL programs would not work as they do >> now. This is considered a minor, low priority item, though. >> >> 3. TODO: We could set column headers better if we wanted to (rather >> than ?column? we could use e.g. Sum_ColumnName etc) > > Did the idea of preserving the original case and using that for output > column names, /d, etc. get shot down? I thought it would be a useful > addition... I think there is broad agreement that we need to provide optional minimally spec compliant behaviour (fold unquoted to upper case, otherwise as now). I am not sure how invasive either the "case preserved + case insensitive comparison" or the "case preserved + case sensitive comparison" option would be. I don't know that anything has been ruled out. Until someone produces a patch or a definite design and analysis we are a bit in the dark. Personally, I would like to see all of these as options ;-) I think Simon's item 3 above is a separate issue. cheers andrew