public inbox for [email protected]  
help / color / mirror / Atom feed
From: Tom Lane <[email protected]>
To: Susanne Ebrecht <[email protected]>
Cc: Robert Haas <[email protected]>
Cc: Grzegorz Szpetkowski <[email protected]>
Cc: [email protected]
Subject: Re: createuser/dropuser username
Date: Fri, 20 May 2011 08:08:25 -0400
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>

Susanne Ebrecht <[email protected]> writes:
> PostgreSQL even is so intelligent - that when you say:
> $ createdb "tEst" - it will ignore the quotes - you will get database 
> named tEst and not
> named "tEst".

Not true.  The reason you don't get quotes there is that the shell
stripped them off.  Try '"tEst"' ...

The current behavior is something that we settled on years ago, after
thinking about the interaction between shell quoting rules and SQL
quoting rules.  If we don't treat SQL names appearing on command lines
as spelled literally, then you have to quote them if you don't want them
downcased --- and doing that in a way that the shell won't mangle is
unpleasant, as in my example above.  So we ruled that all utilities that
take a SQL name from the command line should auto-quote the name.

I'm pretty sure this is documented somewhere, but perhaps not in the
place where Grzegorz looked for it ...

			regards, tom lane



view thread (18+ messages)  latest in thread

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 using the --to and --cc options:
  reply via email

  To: [email protected]
  Cc: [email protected], [email protected], [email protected], [email protected]
  Subject: Re: createuser/dropuser username
  In-Reply-To: <[email protected]>

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

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