X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id E4D7ED1B173 for ; Thu, 24 Jun 2004 12:22:05 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24457-03 for ; Thu, 24 Jun 2004 15:22:02 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id 9274BD1BAFB for ; Thu, 24 Jun 2004 12:22:00 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.12.11/8.12.11) with ESMTP id i5OFLuwL014455; Thu, 24 Jun 2004 11:21:56 -0400 (EDT) To: Andrew Biagioni Cc: Hemapriya , pgsql-admin@postgresql.org Subject: Re: Database, Table Names are resulting in lowercase In-reply-to: <40DAEA31.1090508@e-greek.net> References: <20040624141414.77975.qmail@web21324.mail.yahoo.com> <40DAEA31.1090508@e-greek.net> Comments: In-reply-to Andrew Biagioni message dated "Thu, 24 Jun 2004 10:50:25 -0400" Date: Thu, 24 Jun 2004 11:21:55 -0400 Message-ID: <14454.1088090515@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200406/326 X-Sequence-Number: 13986 Andrew Biagioni writes: > To force mixed or upper case, you quote the names, e.g.: > ALTER TABLE "MyTable" ADD COLUMN "MyNewCol" INT4; Also, the command-line tools that we have (createdb, pg_dump, etc) generally will double-quote any SQL names that are given to them via the shell command line. This is not completely consistent but we settled on that behavior as the most convenient way. For awhile we had these tools just passing command-line arguments through into SQL as-is, so that unquoted names were effectively downcased. But then to put in a mixed-case name you had to do something like $ createdb '"MixedCase"' Simply double-quoting didn't work because the shell would strip off double quotes. That was just too ugly to work with, thus the current behavior was arrived at. regards, tom lane