Skip site navigation (1) Skip section navigation (2)

Re: BUG #2764: Capital letter in tables or columns not

From: Reece Hart <reece(at)harts(dot)net>
To: Ron Teitelbaum <ron(at)usmedrec(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2764: Capital letter in tables or columns not
Date: 2006-11-21 03:47:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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 .  Oracle has the same behavior, but uppercase unquoted identfiers. I seem to recall reading that the SQL spec requires that identifiers be treated as one or the other, but doesn't say which (upper or lower). 

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

rkh(at)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,, 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.

In response to

pgsql-bugs by date

Next:From: Bruce MomjianDate: 2006-11-21 03:50:05
Subject: Re: BUG #2759: \df doesn't show functions with no args
Previous:From: Euler Taveira de OliveiraDate: 2006-11-21 02:28:46
Subject: Re: BUG #2771: NULL values in FOREIGN KEY fields

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group