Re: [HACKERS] Case Preservation disregarding case
От | Ken Johanson |
---|---|
Тема | Re: [HACKERS] Case Preservation disregarding case |
Дата | |
Msg-id | 4572F4B4.4060600@kensystem.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Case Preservation disregarding case ("Chuck McDevitt" <cmcdevitt@greenplum.com>) |
Список | pgsql-sql |
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
В списке pgsql-sql по дате отправления: