Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1a1Liz-0003AS-1S for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Nov 2015 22:06:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1a1Liy-00047o-El for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Nov 2015 22:06:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a1LiM-0003Qx-DC for pgsql-bugs@postgresql.org; Tue, 24 Nov 2015 22:05:30 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1a1LiJ-0005NK-WC for pgsql-bugs@postgresql.org; Tue, 24 Nov 2015 22:05:29 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id tAOM5Qks032253; Tue, 24 Nov 2015 17:05:26 -0500 From: Tom Lane To: xelah-postgresql@xelah.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #13783: 'create database test owner testowner' as 'postgres' leaves test.public owned by postgres In-reply-to: <20151124121258.435.64678@wrigleys.postgresql.org> References: <20151124121258.435.64678@wrigleys.postgresql.org> Comments: In-reply-to xelah-postgresql@xelah.com message dated "Tue, 24 Nov 2015 12:12:58 +0000" Date: Tue, 24 Nov 2015 17:05:26 -0500 Message-ID: <32252.1448402726@sss.pgh.pa.us> X-Pg-Spam-Score: -2.5 (--) 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 xelah-postgresql@xelah.com writes: > '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. Yes, the public schema remains owned by the bootstrap superuser. That's intentional. If you don't want to have that schema, you can drop it, but you need superuser privileges to do so. regards, tom lane -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs