Re: PostgreSQL Gotchas

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: Lincoln Yeoh <lyeoh(at)pop(dot)jaring(dot)my>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, 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-16 14:36:29
Message-ID: 20051016143625.GE5779@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sun, Oct 16, 2005 at 10:00:25PM +0800, Lincoln Yeoh wrote:
> >Martijn van Oosterhout <kleptog(at)svana(dot)org> writes:
> >> Seems to me we'd be better off creating an option
> >> "lowercase_quoted_anyway" which solves everything, at the expense of
> >> being even less compliant.
>
> I think that'll be a good option to have.

Actually, perhaps an even more restricted version would be better.
Lowercase quoted identifiers only if they are all uppercase. So then:

Foo == FOO = foo == "foo" == "FOO" != "Foo"

assuming it can be implemented with some mediocum of efficiency.

> It must be a very small subset who rely on "Foo" and "foo" to be different
> AND also rely on "FOO" and FOO to be the same. Wonder what's the term for
> the even smaller subset who intentionally would want that.

The strictly standards compliant group? But then, they'd probably want
us to remove LIMIT/OFFSET so I'm not sure we need to worry about that.

Note to implementor: In 'SELECT 1 as "Title"', the quoted string should
not be lowercased, even if you are lowercasing everything else...

Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Andrew Janian 2005-10-16 16:28:52 Long running update
Previous Message Leonard Soetedjo 2005-10-16 14:20:47 Converting mysql dump to pgsql