Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a1LS3-0002GP-UE for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Nov 2015 21:48:40 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a1LS3-0001n6-Go for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Nov 2015 21:48:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a1CT5-00087E-79 for pgsql-bugs@postgresql.org; Tue, 24 Nov 2015 12:13:07 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1a1CT2-0003w6-50 for pgsql-bugs@postgresql.org; Tue, 24 Nov 2015 12:13:06 +0000 MIME-Version: 1.0 Subject: BUG #13783: 'create database test owner testowner' as 'postgres' leaves test.public owned by postgres To: pgsql-bugs@postgresql.org From: xelah-postgresql@xelah.com Date: Tue, 24 Nov 2015 12:12:58 +0000 Message-ID: <20151124121258.435.64678@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" 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 The following bug has been logged on the website: Bug reference: 13783 Logged by: Alex Hayward Email address: xelah-postgresql@xelah.com PostgreSQL version: 9.4.5 Operating system: Debian 8.2 Description: 'CREATE DATABASE .. OWNER ..' creates a database owned by the correct user, but containing a schema apparently owned by the user running 'CREATE DATABASE'. This causes us a problem when our test code tries to 'DROP SCHEMA public CASCADE' (as a way of clearing the database) as the database owner. example: PGHOST=127.0.0.1 psql template1 postgres Password for user postgres: psql (9.4.5) Type "help" for help. template1=# create user test; CREATE ROLE template1=# create database test owner test; CREATE DATABASE template1=# \c test You are now connected to database "test" as user "postgres". test=# \dn List of schemas Name | Owner --------+---------- public | postgres (1 row) test=# -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs