Re: Bringing PostgreSQL torwards the standard regarding

From: Shachar Shemesh <psql(at)shemesh(dot)biz>
To: Rod Taylor <pg(at)rbt(dot)ca>
Cc: PostgreSQL Development <pgsql-hackers(at)postgresql(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Subject: Re: Bringing PostgreSQL torwards the standard regarding
Date: 2004-04-25 16:03:17
Message-ID: 408BE145.90201@shemesh.biz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Rod Taylor wrote:

>>5. If the identifier is lowercase only, convert it to uppercase only. I
>>am assuming here that the authors of the client code chose an
>>uppercase-folding database, so they should know what they are doing when
>>accessing stuff from the standard offering.
>>
>>
>
>You've just broken one of my databases.
>
>In one project I quote nearly everything and do so in lower case only.
>This was done to ensure portability between PostgreSQL, Oracle, etc. --
>but with my preference of lower case names.
>
>
I'm not sure you understood me.

First, if we don't convert lower->upper, how can anyone expect the
following query to work:
select lower(id) from table;

Even if you quote everything, you'd still probably have:
select lower("id") from "table";

Noone can expect you to do:
select "lower"("id") from "table";

The problem is that "lower" is defined in template1. If we don't
uppercase it when we create the database, the above won't work. Then
again, I'm fairly sure that the identifiers you placed as lowercase in
your database are not defined by template1.

In short, I don't think this suggestion broke your database.

Shachar

--
Shachar Shemesh
Lingnu Open Source Consulting
http://www.lingnu.com/

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rod Taylor 2004-04-25 16:08:30 Re: Bringing PostgreSQL torwards the standard regarding
Previous Message Rod Taylor 2004-04-25 15:11:33 Re: Bringing PostgreSQL torwards the standard regarding