pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Ken Johanson <pg-user@kensystem.com>
To: Martijn van Oosterhout <kleptog@svana.org>
Cc: pgsql-sql@postgresql.org
Subject: Re: [HACKERS] Case Preservation disregarding case
Date: Sun, 03 Dec 2006 09:00:52 -0700
Message-ID: <4572F4B4.4060600@kensystem.com> (raw)
In-Reply-To: <20061203141710.GC22386@svana.org>
References: <EB48EBF3B239E948AC1E3F3780CF8F88012F88DD@MI8NYCMAIL02.Mi8.com>
	<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>

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






view thread (29+ messages)  latest in thread

Message-ID: <4572F4B4.4060600@kensystem.com>
Permalink:  ../4572F4B4.4060600@kensystem.com/
Also on:    postgresql.org/message-id/4572F4B4.4060600@kensystem.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: pg-user@kensystem.com, kleptog@svana.org
  Subject: Re: [HACKERS] Case Preservation disregarding case
  In-Reply-To: <4572F4B4.4060600@kensystem.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox