Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1ZOZ05-0008UY-4D for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Aug 2015 22:23:29 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1ZOZ04-0003Dy-Ln for pgsql-hackers@arkaria.postgresql.org; Sun, 09 Aug 2015 22:23:28 +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 1ZOZ04-0003Dl-2X for pgsql-hackers@postgreSQL.org; Sun, 09 Aug 2015 22:23:28 +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 1ZOYzx-0006mr-8r for pgsql-hackers@postgreSQL.org; Sun, 09 Aug 2015 22:23:26 +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 t79MNDZt020082; Sun, 9 Aug 2015 18:23:13 -0400 From: Tom Lane To: Andrew Dunstan cc: pgsql-hackers@postgreSQL.org, Peter Eisentraut Subject: Re: [COMMITTERS] pgsql: Fix pg_dump to dump shell types. In-reply-to: <55C7CF3B.30703@dunslane.net> References: <55C7CF3B.30703@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Sun, 09 Aug 2015 18:07:55 -0400" Date: Sun, 09 Aug 2015 18:23:13 -0400 Message-ID: <20081.1439158993@sss.pgh.pa.us> X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org Andrew Dunstan writes: > Still not quite there. If either 9.0 or 9.1 is upgraded to 9.2 or later, > they fail like this: > pg_restore: creating TYPE "public"."myshell" > pg_restore: setting owner and privileges for TYPE "public"."myshell" > pg_restore: setting owner and privileges for ACL "public"."myshell" > pg_restore: [archiver (db)] Error from TOC entry 4293; 0 0 ACL > myshell buildfarm > pg_restore: [archiver (db)] could not execute query: ERROR: type > "myshell" is only a shell > Command was: REVOKE ALL ON TYPE "myshell" FROM PUBLIC; > REVOKE ALL ON TYPE "myshell" FROM "buildfarm"; > GRANT ALL ON TYPE "myshell" TO PUBL... > We could just declare that we don't support this for versions older than > 9.2, in which case I would just remove the type from the test database > before testing cross-version upgrade. But if it's easily fixed then > let's do it. It looks to me like the reason for this is that pg_dump forces the "typacl" of a type to be '{=U}' when reading the schema data for a pre-9.2 type, rather than reading it as NULL (ie default permissions) which would result in not printing any grant/revoke commands for the object. I do not see a good reason for that; quite aside from this problem, it means there is one more place that knows the default permissions for a type than there needs to be. Peter, what was the rationale? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers