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




---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

              http://www.postgresql.org/docs/faq

Reply via email to