Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-admin by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group