Re: PostgreSQL Gotchas

From: Chris Travers <chris(at)travelamericas(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Chris Travers <chris(at)travelamericas(dot)com>, Scott Marlowe <smarlowe(at)g2switchworks(dot)com>, Stephen Frost <sfrost(at)snowman(dot)net>, "Aly S(dot)P Dharshi" <aly(dot)dharshi(at)telus(dot)net>, "Gavin M(dot) Roy" <gmr(at)ehpg(dot)net>, pgsql-general(at)postgresql(dot)org
Subject: Re: PostgreSQL Gotchas
Date: 2005-10-13 19:21:14
Message-ID: 434EB3AA.8000103@travelamericas.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:

>Chris Travers <chris(at)travelamericas(dot)com> writes:
>
>
>>So basically, the problem is that any fix for case folding would touch a
>>fair bit of code and possibly cause other problems. However, I haven't
>>seen anyone worry about performance issues in such a fix, just that it
>>might be a fair bit of work.
>>
>>
>
>More that it's likely to create serious forwards, backwards, and
>sideways compatibility problems :-(. The work involved is mostly
>in figuring out how to deal with that.
>
>
Just thinking based on this conversation.... Obviously, you and others
are the authorities on the code that I am not. However, here are the
thoughts that occur to me....

First, I am not sure that it is necessary to make things that bad. It
seems that the main objection has to do with table and column names in
system catalogs. Otherwise, whichever case a table name is in, it is
in. I don't see anyone running out and saying "we should match either
upper or lower cases in a single session without knowing which one a
table is in" though I admit that the usability issues might lead to such
a request in the future. Perhaps this is the biggest sideways
compatibility issue you were mentioning.

Otherwise, it might be sufficient for the backend to quote the names of
the catalogs anytime it uses them. Again, this means touching a lot of
code and possibly creating bugs, etc. But I haven't heard any reason to
think that it would be a (significant) performance hit.

>Since the end reward for all this work would be having to read CATALOGS
>WRITTEN IN ALL UPPER CASE, none of the key developers seem very
>interested ...
>
>
Why would this be required? If an individual developer wants to have a
db with folding to uppercase, that developer can easily quote any
references to system tables himself. I don't see why this is a
requirement. "Case sensitivity" is "Case sensitivity" is "Case
sensitivity" ...

Furthermore, if you are going to go there, then you have to deal with
the inevitable question of what we do when people request the same
behavior for other tables. See above. However, none of this is
required to be standards-compatibile, unless I am missing something else....

Best Wishes,
Chris Travers
Metatron Technology Consulting

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Sullivan 2005-10-13 19:26:33 Re: On "multi-master"
Previous Message Chris Travers 2005-10-13 19:01:19 Re: On "multi-master"