Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vz74t-0006yP-NC for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Jan 2014 15:54:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Vz74t-0000Z7-5A for pgsql-bugs@arkaria.postgresql.org; Fri, 03 Jan 2014 15:54:27 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vz74f-0000Yq-4V for pgsql-bugs@postgresql.org; Fri, 03 Jan 2014 15:54:13 +0000 Received: from sam.nabble.com ([216.139.236.26]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Vz74X-0001qr-WB for pgsql-bugs@postgresql.org; Fri, 03 Jan 2014 15:54:12 +0000 Received: from [192.168.236.26] (helo=sam.nabble.com) by sam.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1Vz74X-0000HV-LL for pgsql-bugs@postgresql.org; Fri, 03 Jan 2014 07:54:05 -0800 Date: Fri, 3 Jan 2014 07:54:05 -0800 (PST) From: David Johnston To: pgsql-bugs@postgresql.org Message-ID: <1388764445653-5785235.post@n5.nabble.com> In-Reply-To: References: Subject: Re: BUG #8719: user creation including role does not work nor complain if in keyword is not specified MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: 3.7 (+++) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org andres.more wrote > The following bug has been logged on the website: > > Bug reference: 8719 > Logged by: Andres More > Email address: > andres.more@ > PostgreSQL version: 9.3.1 > Operating system: Amazon RDS > Description: > > If I create a new user with an specific role it it not included unless IN > is > included. However without IN the statement does not throw an error. > > > Amazon RDS postgres engine does not offer an admin user, but a light > version > called rds_superuser. > > > CREATE USER sql_ro_user2 WITH ENCRYPTED PASSWORD 'sql_ro_password' ROLE > rds_superuser LOGIN > > > opscode_chef=> \du > List of roles > Role name | Attributes | > Member of > -----------------+------------------------------------------------+--------------------------------------------------------- > opscode_chef | | {} > opscode_chef_ro | | {} > opscodepgsql | Create role, Create DB | > {rds_superuser} > rds_superuser | Cannot login | > {opscode_chef,opscode_chef_ro,sql_ro_user,sql_ro_user2} > rdsadmin | Superuser, Create role, Create DB, Replication | {} > sql_ro_user | | {} > sql_ro_user2 | | {} > > > CREATE USER sql_ro_user3 WITH ENCRYPTED PASSWORD 'sql_ro_password' IN ROLE > rds_superuser LOGIN > > > opscode_chef=> \du > List of roles > Role name | Attributes | > Member of > -----------------+------------------------------------------------+--------------------------------------------------------- > opscode_chef | | {} > opscode_chef_ro | | {} > opscodepgsql | Create role, Create DB | > {rds_superuser} > rds_superuser | Cannot login | > {opscode_chef,opscode_chef_ro,sql_ro_user,sql_ro_user2} > rdsadmin | Superuser, Create role, Create DB, Replication | {} > sql_ro_user | | {} > sql_ro_user2 | | {} > sql_ro_user3 | | > {rds_superuser} Both ROLE and IN ROLE are valid command options for CREATE ROLE. RTFM for more details. Your example shows that the two commands are working as expected. David J. -- View this message in context: http://postgresql.1045698.n5.nabble.com/BUG-8719-user-creation-including-role-does-not-work-nor-complain-if-in-keyword-is-not-specified-tp5785225p5785235.html Sent from the PostgreSQL - bugs mailing list archive at Nabble.com. -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs