Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 373409FA354 for ; Sun, 3 Dec 2006 12:01:21 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 57553-01 for ; Sun, 3 Dec 2006 12:00:45 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from www01.kensystem.com (www01.kensystem.com [72.19.170.120]) by postgresql.org (Postfix) with ESMTP id 136449F9EED for ; Sun, 3 Dec 2006 12:00:55 -0400 (AST) Received: from 192.168.0.6 by www01.kensystem.com (SMTPD); id s20061203160052.76005; Sun, 03 Dec 2006 16:00:52 Message-ID: <4572F4B4.4060600@kensystem.com> Date: Sun, 03 Dec 2006 09:00:52 -0700 From: Ken Johanson Reply-To: ken@kensystem.com User-Agent: Thunderbird 1.5.0.7 (Windows/20060909) MIME-Version: 1.0 To: Martijn van Oosterhout CC: pgsql-sql@postgresql.org Subject: Re: [HACKERS] Case Preservation disregarding case References: <45712E31.1030004@kensystem.com> <20061202133556.GC26365@svana.org> <457199E4.3010401@kensystem.com> <4571A3AF.6070608@zigo.dhs.org> <4571AE66.7050304@kensystem.com> <4571B392.6020303@zigo.dhs.org> <4571C133.1060200@kensystem.com> <20061202201822.GD26365@svana.org> <45725923.7010500@kensystem.com> <20061203141710.GC22386@svana.org> In-Reply-To: <20061203141710.GC22386@svana.org> 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: 200612/36 X-Sequence-Number: 26992 Martijn van Oosterhout wrote: > I think you're missing the point that clients will be using languages > that are case sensetive. Consider the following Perl code: > > $dbh->do("CREATE TEMP TABLE foo (Bar int4)"); > $dbh->do("INSERT INTO foo VALUES (1)"); > my $sth = $dbh->prepare("SELECT Bar FROM foo"); > $sth->execute(); > my $row = $sth->fetchrow_hashref(); > print $row->{"bar"}; # prints 1 > > This code will works on any version of postgresql ever released, yet > your change will break it. By setting some options you can work around > it, but it's still a gratuitous change. > > Have a nice day, I agree, that code would break -- if the option were enabled globally -- because the named-column retrieval internals of that and many existing modules don't do case-insens lookups. They would have to be retrofitted to support it. So that is the reason there was an idea proposed per database or per connection SQL conformance controls (like what Mysql has). They'd allow other apps to elect "less standard" modes (not just this one), for the sake of compatibility (beit old PG modules or and other DB). You code sample would continue to work. Ken