pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Biagioni <andrew.biagioni@e-greek.net>
Cc: Hemapriya <priyam_1121@yahoo.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: Database, Table Names are resulting in lowercase
Date: Thu, 24 Jun 2004 11:21:55 -0400
Message-ID: <14454.1088090515@sss.pgh.pa.us> (raw)
In-Reply-To: <40DAEA31.1090508@e-greek.net>
References: <20040624141414.77975.qmail@web21324.mail.yahoo.com>
	<40DAEA31.1090508@e-greek.net>

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



view thread (3+ messages)

Message-ID: <14454.1088090515@sss.pgh.pa.us>
Permalink:  ../14454.1088090515@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14454.1088090515@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: tgl@sss.pgh.pa.us, andrew.biagioni@e-greek.net, priyam_1121@yahoo.com
  Subject: Re: Database, Table Names are resulting in lowercase
  In-Reply-To: <14454.1088090515@sss.pgh.pa.us>
  References: <20040624141414.77975.qmail@web21324.mail.yahoo.com> <40DAEA31.1090508@e-greek.net> <14454.1088090515@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox