Re: Database, Table Names are resulting in lowercase

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Biagioni <andrew(dot)biagioni(at)e-greek(dot)net>
Cc: Hemapriya <priyam_1121(at)yahoo(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: Database, Table Names are resulting in lowercase
Date: 2004-06-24 15:21:55
Message-ID: 14454.1088090515@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Andrew Biagioni <andrew(dot)biagioni(at)e-greek(dot)net> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Bruno Wolff III 2004-06-24 17:56:57 Re: How can I backup database from database itself
Previous Message Andrew Biagioni 2004-06-24 14:50:25 Re: Database, Table Names are resulting in lowercase