Re: The folding of unquoted names to lower case in PostgreSQL

From: Dennis Gearon <gearond(at)cvc(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "scott(dot)marlowe" <scott(dot)marlowe(at)ihs(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, Andrew Sullivan <andrew(at)libertyrms(dot)info>, pgsql-general(at)postgresql(dot)org
Subject: Re: The folding of unquoted names to lower case in PostgreSQL
Date: 2003-03-14 22:11:59
Message-ID: 3E7253AF.4050204@cvc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

About the only way it would work, is to have a conversion utility, that
walks a user through all the questionable areas. Sounds like windbloze,
only sideways, huh ;-)

Tom Lane wrote:
> "scott.marlowe" <scott(dot)marlowe(at)ihs(dot)com> writes:
>
>>Now that catalogs live in the
>>pg_catalog schema, I could just treat anything in the pg_catalog to be
>>fold to lower, while everything else would fold to upper.
>
>
> And you will determine whether something is in pg_catalog how, when you
> haven't yet done a catalog lookup for it?
>
> Keep in mind that the problem exists not only for system catalog names,
> but for column names in those catalogs, not to mention built-in
> functions. So looking at whether the name starts with "pg_" really
> doesn't get you far as a way of deciding which way to fold.
>
> Possibly you could make something of "fold to upper case originally,
> but refold to lower case before looking in pg_catalog". I have no idea
> how to implement that in a way that's not a horrid kluge though. Also,
> it'd likely have unpleasant failure modes in some non-ASCII locales
> where upcasing and downcasing aren't quite inverses. (Check the
> archives for past problems with keywords in Turkish...)
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2003-03-14 22:27:37 Re: LIMIT/OFFSET doesn't work on PL/PGSQL
Previous Message Tom Lane 2003-03-14 22:01:22 Re: The folding of unquoted names to lower case in PostgreSQL