Received: from neron.mgc.pl (host-203-154.tele2.pl [213.173.203.154]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7R3aFf71888 for ; Sun, 26 Aug 2001 23:36:30 -0400 (EDT) (envelope-from depesz@depesz.pl) Received: from neron.mgc.pl ([192.168.0.1] helo=neron ident=depesz) by neron.mgc.pl with smtp (Exim 3.22 #1) id 15bDBt-0004a5-00; Mon, 27 Aug 2001 05:35:57 +0200 Date: Mon, 27 Aug 2001 05:35:57 +0200 From: hubert depesz lubaczewski To: "Robert J. Sanford, Jr." Cc: pgsql-general@postgresql.org Subject: Re: case sensitivity? Message-Id: <20010827053557.6d628ec7.depesz@depesz.pl> In-Reply-To: References: X-Mailer: Sylpheed version 0.5.3 (GTK+ 1.2.10; ) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Disclaimer: test disclaimer X-Archive-Number: 200108/866 X-Sequence-Number: 14271 On Sun, 26 Aug 2001 16:06:14 -0500 "Robert J. Sanford, Jr." wrote: > is there any setting that will allow postgres to > keep mixed case column names when creating a db? yes: when you create table make sure all identifiers are inside quotation marks ("). like this: create table "MyTable" ( id SERIAL, "Name" TEXT, "Phone" TEXT, PRIMARY KEY (id) ); but since then all your select's have to work with quotation mark, i.e. this will not work: select name from mytable; nor will work this: select Name from MyTable; you have to explicity do: select "Name" from "MyTable"; the reason is very simple. pgsql internally converts all names, identifiers and so on to lower case. both in create statements and in select's, update's and so on. i hope you have it clear now. depesz p.s. sorry for my english -- hubert depesz lubaczewski http://www.depesz.pl/ ------------------------------------------------------------------------ ... and the end of all our exploring will be to arrive where we started and know the place for the first time. -- T. S. Eliot