Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id AFE15B5DBE6 for ; Fri, 20 May 2011 06:10:09 -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 22591-06 for ; Fri, 20 May 2011 09:10:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from outmail148093.authsmtp.net (outmail148093.authsmtp.net [62.13.148.93]) by mail.postgresql.org (Postfix) with ESMTP id DDB47B5D8B2 for ; Fri, 20 May 2011 06:10:01 -0300 (ADT) Received: from mail-c194.authsmtp.com (mail-c194.authsmtp.com [62.13.128.121]) by punt12.authsmtp.com (8.14.2/8.14.2/Kp) with ESMTP id p4K99wQC021325; Fri, 20 May 2011 10:09:58 +0100 (BST) Received: from [192.168.23.4] (212.100.42.202.fixip.bitel.net [212.100.42.202]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2) with ESMTP id p4K99r6Q046997; Fri, 20 May 2011 10:09:53 +0100 (BST) Message-ID: <4DD62FE1.9010607@2ndQuadrant.com> Date: Fri, 20 May 2011 11:09:53 +0200 From: Susanne Ebrecht User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: Robert Haas CC: Grzegorz Szpetkowski , pgsql-docs@postgresql.org Subject: Re: createuser/dropuser username References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Server-Quench: ecc8999e-82c0-11e0-80b9-0022640b883e X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCdxZQATClZOUR8T DCUJJHVGRTw4LxFW CBkfawBdJUwMSABN M15eIxoIcUtGHRZ8 Ui8UWVRVUU1wWWl1 YgBUbktfY0hQXgVq TkxLXFBSFhpqBAMB SF4aKRB7NQMneHp2 bE9lEHdYXUU0IBUu SkddHDgbbWUzaH0e URVYagtUIgpXfh9H aFZ7VCEFaWZSKBg1 TUcAExcaBgAXIz5Y Sx0AMEkfWwEHBDkk WgsPB30yBkAfQSw2 InQA X-Authentic-SMTP: 61633235383639.1015:706 X-AuthFastPath: 0 (Was 255) X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201105/65 X-Sequence-Number: 6740 On 19.05.2011 22:15, Robert Haas wrote: > On Wed, May 4, 2011 at 12:05 PM, Grzegorz Szpetkowski > wrote: >> Hi, >> >> I think that createuser/drouser reference documentation could be >> enhanced for username param. There is: >> >> "createuser is a wrapper around the SQL command CREATE ROLE. There is >> no effective difference between creating users via this utility and >> via other methods for accessing the server." >> >> http://www.postgresql.org/docs/9.0/static/app-createuser.html >> http://www.postgresql.org/docs/9.0/static/app-dropuser.html >> >> But createuser and dropuser wrappers in some cases are doing implicit >> quoting (when CREATE ROLE is not), which I think is not fully known >> and is undocumented here. For example: > I'm not sure this really needs to be documented, but what exactly do > you have in mind? Honestly, I think we should document that the scripts use quotes. I just made an ad-hoc look into the docs and couldn't find something about it. Lots of years ago - you could see me sitting in front of my computer and wondering - because I used: $ createdb test $ createdb tEst I wondered that I didn't got an error message. Thinking deeper about it just let it get logical to me that createdb quotes by automatism. But this isn't logical on the first view - because we point out that all will get to lower case without quotes. 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". This all isn't really obvious to a typical user. Best Regards, Susanne -- Susanne Ebrecht - 2ndQuadrant PostgreSQL Development, 24x7 Support, Training and Services www.2ndQuadrant.com