Re: createuser/dropuser username - Mailing list pgsql-docs

From Tom Lane
Subject Re: createuser/dropuser username
Date
Msg-id 8486.1305893305@sss.pgh.pa.us
Whole thread Raw
In response to Re: createuser/dropuser username  (Susanne Ebrecht <susanne@2ndQuadrant.com>)
Responses Re: createuser/dropuser username
Re: createuser/dropuser username
List pgsql-docs
Susanne Ebrecht <susanne@2ndQuadrant.com> 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

pgsql-docs by date:

Previous
From: Tom Lane
Date:
Subject: Re: non-ASCII characters in SGML documentation (and elsewhere)
Next
From: Alvaro Herrera
Date:
Subject: Re: non-ASCII characters in SGML documentation (and elsewhere)