Re: Database, Table Names are resulting in lowercase - Mailing list pgsql-admin

From Tom Lane
Subject Re: Database, Table Names are resulting in lowercase
Date
Msg-id 14454.1088090515@sss.pgh.pa.us
Whole thread Raw
In response to Re: Database, Table Names are resulting in lowercase  (Andrew Biagioni <andrew.biagioni@e-greek.net>)
List pgsql-admin
Andrew Biagioni <andrew.biagioni@e-greek.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

pgsql-admin by date:

Previous
From: Andrew Biagioni
Date:
Subject: Re: Database, Table Names are resulting in lowercase
Next
From: Bruno Wolff III
Date:
Subject: Re: How can I backup database from database itself