Re: BUG #2764: Capital letter in tables or columns not - Mailing list pgsql-bugs

From Reece Hart
Subject Re: BUG #2764: Capital letter in tables or columns not
Date
Msg-id 1164080853.4011.10.camel@snafu.site
Whole thread Raw
In response to BUG #2764: Capital letter in tables or columns not supported  ("Ron Teitelbaum" <ron@usmedrec.com>)
List pgsql-bugs
On Fri, 2006-11-17 at 19:40 +0000, Ron Teitelbaum wrote:
> Description:        Capital letter in tables or columns not supported

Unquoted identifiers are always smashed down to lowercase. Quoted
identifiers are taken verbatim, including case.

This is not a bug: it's documented in
http://www.postgresql.org/docs/8.1/interactive/sql-syntax.html#SQL-SYNTAX-IDENTIFIERS .  Oracle has the same behavior,
butuppercase unquoted identfiers. I seem to recall reading that the SQL spec requires that identifiers be treated as
oneor the other, but doesn't say which (upper or lower).  

rkh@csb-dev=> create temp table test (lccol text, Uccol text, ALLUCCOL
text, "lccol_q" text, "Uccol_q" text, "ALLUCCOL_q" text);
CREATE TABLE
Time: 233.815 ms

rkh@csb-dev=> \d test
    Table "pg_temp_1.test"
   Column   | Type | Modifiers
------------+------+-----------
 lccol      | text |
 uccol      | text |
 alluccol   | text |
 lccol_q    | text |
 Uccol_q    | text |
 ALLUCCOL_q | text |


-rEecE (take your pick on case)

--
Reece Hart, http://harts.net/reece/, GPG:0x25EC91A0
./universe -G 6.672e-11 -e 1.602e-19 -protonmass 1.673e-27 -uspres bush
kernel warning: universe consuming too many resources. Killing.
universe received SIGKILL due to catastrophic leadership. Try -uspres carter.

pgsql-bugs by date:

Previous
From: "Mikko Tiihonen"
Date:
Subject: BUG #2768: dates before year 1600 in timestamptz column give strange results
Next
From: Tom Lane
Date:
Subject: Re: BUG #2767: Bug in avg(interval)