Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 035FF4759F2 for ; Fri, 25 Oct 2002 08:48:57 -0400 (EDT) Received: from megazone.bigpanda.com (megazone.bigpanda.com [63.150.15.178]) by postgresql.org (Postfix) with ESMTP id 812C9474E5C for ; Fri, 25 Oct 2002 08:48:56 -0400 (EDT) Received: by megazone.bigpanda.com (Postfix, from userid 1001) id DB072D5FA; Fri, 25 Oct 2002 05:48:59 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by megazone.bigpanda.com (Postfix) with ESMTP id CCC365C03; Fri, 25 Oct 2002 05:48:59 -0700 (PDT) Date: Fri, 25 Oct 2002 05:48:59 -0700 (PDT) From: Stephan Szabo To: Reiner Dassing Cc: Subject: Re: Upper / lower cases on table and column names In-Reply-To: <3DB93607.2050202@wettzell.ifag.de> Message-ID: <20021025054139.C34720-100000@megazone23.bigpanda.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/355 X-Sequence-Number: 10072 On Fri, 25 Oct 2002, Reiner Dassing wrote: > I was trying to adopt a database application to PostgreSQL. > (It is written for MySQL and Oracle using perl) > > During this process I recognized the phenomena that upper case letters > of table names and column names are not preserved > in PostgreSQL. > Is this a "featue" of PostgreSQL or do I miss something? There's some question about whether it should instead fold to upper case, but in any case its a sort of cheat to handle the case insensitivity of regular identifiers. > create table data ( Id int not null, textId int not null); > create table Data ( Id int not null, textId int not null); > > results in: > ERROR: Relation 'data' already exists > > In the interpretation of my application table 'data' and 'Data' is something > different. AFAICT it shouldn't be. SQL92 basically says that two regular identifiers are the equivalent if the identifer bodies compare equally. The identifier bodies of a regular identifier are equivalent to an identifier body in which each lower-case character is replaced with an upper case one.