Re: PostgreSQL Gotchas

From: Greg Stark <gsstark(at)mit(dot)edu>
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-14 06:42:18
Message-ID: 87wtkgha5x.fsf@stark.xeocode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:

> If you write, say,
>
> select max(relpages) from pg_class;
>
> and the lexer thinks that it should fold unquoted identifiers to upper
> case, then the catalog entries defining these names had better read
> PG_CLASS, RELPAGES, and MAX, not the lower-case names they contain
> today.

Well the case of unquoted identifiers could be finessed by having it match
RELPAGES first and fail over to relpages second. It could even be made to
match RelPages and whatever if there isn't any ambiguity.

I think the problem case arises when you have code that has a quoted
"relpages". In that case the code is just not going to work unless the column
really is named "relpages" not "RELPAGES".

So to be completely backward compatible you need "relpages" as well as an
unquoted relpages to work. And to be spec compliant you need "RELPAGES" to
work too. That makes things a bit sticky.

--
greg

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message A. Kretschmer 2005-10-14 07:19:01 Re: installation guide
Previous Message srikanth potluri 2005-10-14 06:36:26 installation guide