Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WY4AC-0000Rv-Vi for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Apr 2014 01:52:25 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1WY4AC-0006pZ-FB for pgsql-bugs@arkaria.postgresql.org; Thu, 10 Apr 2014 01:52:24 +0000 Received: from makus.postgresql.org ([2001:4800:7903:4::125]) by malur.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WY4AA-0006pQ-Et for pgsql-bugs@postgresql.org; Thu, 10 Apr 2014 01:52:22 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1WY4A7-0002hl-GE for pgsql-bugs@postgresql.org; Thu, 10 Apr 2014 01:52:21 +0000 Received: from bruce by momjian.us with local (Exim 4.72) (envelope-from ) id 1WY4A6-0006xa-CB; Wed, 09 Apr 2014 21:52:18 -0400 Date: Wed, 9 Apr 2014 21:52:18 -0400 From: Bruce Momjian To: chris@chrullrich.net Cc: pgsql-bugs@postgresql.org Subject: Re: BUG #8695: Reloading dump fails at COMMENT ON EXTENSION plpgsql Message-ID: <20140410015218.GP8685@momjian.us> References: <20140331170009.GA18559@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20140331170009.GA18559@momjian.us> User-Agent: Mutt/1.5.20 (2009-06-14) X-Pg-Spam-Score: -2.2 (--) 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 On Mon, Mar 31, 2014 at 01:00:09PM -0400, Bruce Momjian wrote: > CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; > CREATE EXTENSION > --> COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; > --> ERROR: must be owner of extension plpgsql > REVOKE ALL ON SCHEMA public FROM PUBLIC; > WARNING: no privileges could be revoked for "public" > REVOKE > REVOKE ALL ON SCHEMA public FROM postgres; > WARNING: no privileges could be revoked for "public" > REVOKE > GRANT ALL ON SCHEMA public TO postgres; > WARNING: no privileges were granted for "public" > GRANT > GRANT ALL ON SCHEMA public TO PUBLIC; > WARNING: no privileges were granted for "public" > GRANT > > This would certainly cause a restore to abort for a non-super-user if > psql used --set ON_ERROR_STOP=on. Any easy way to fix this? I am not > super-excited about the suggested fixes listed above. In looking at this further, I wonder why we don't filter out pg_catalog extensions when we dump them; right now we use: appendPQExpBufferStr(query, "SELECT x.tableoid, x.oid, " "x.extname, n.nspname, x.extrelocatable, x.extversion, x.extconfig, x.extcondition " "FROM pg_extension x " "JOIN pg_namespace n ON n.oid = x.extnamespace"); I see a filter on pg_catalog for pg_proc. Is there a reason there isn't one for pg_extension? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + Everyone has their own god. + -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs