Re: createuser/dropuser username

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Susanne Ebrecht <susanne(at)2ndQuadrant(dot)com>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, Grzegorz Szpetkowski <gszpetkowski(at)gmail(dot)com>, pgsql-docs(at)postgresql(dot)org
Subject: Re: createuser/dropuser username
Date: 2011-05-20 12:08:25
Message-ID: 8486.1305893305@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Susanne Ebrecht <susanne(at)2ndQuadrant(dot)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

In response to

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Alvaro Herrera 2011-05-20 12:16:19 Re: non-ASCII characters in SGML documentation (and elsewhere)
Previous Message Tom Lane 2011-05-20 11:56:58 Re: non-ASCII characters in SGML documentation (and elsewhere)