Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id D6CD2B5D8B2 for ; Fri, 20 May 2011 09:08:37 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 48894-09 for ; Fri, 20 May 2011 12:08:31 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DC17EB5D801 for ; Fri, 20 May 2011 09:08:30 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p4KC8PQC008487; Fri, 20 May 2011 08:08:25 -0400 (EDT) To: Susanne Ebrecht cc: Robert Haas , Grzegorz Szpetkowski , pgsql-docs@postgresql.org Subject: Re: createuser/dropuser username In-reply-to: <4DD62FE1.9010607@2ndQuadrant.com> References: <4DD62FE1.9010607@2ndQuadrant.com> Comments: In-reply-to Susanne Ebrecht message dated "Fri, 20 May 2011 11:09:53 +0200" Date: Fri, 20 May 2011 08:08:25 -0400 Message-ID: <8486.1305893305@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201105/67 X-Sequence-Number: 6742 Susanne Ebrecht 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