Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tables belonging to an extension - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tables belonging to an extension
Date
Msg-id 18075.1484254811@sss.pgh.pa.us
Whole thread Raw
In response to Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tablesbelonging to an extension  (Moshe Jacobson <moshe@neadwerx.com>)
Responses Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tablesbelonging to an extension
List pgsql-bugs
Moshe Jacobson <moshe@neadwerx.com> writes:
> On Thu, Jan 12, 2017 at 2:01 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think this scenario is simply pilot error, or at least gross abuse of
>> the extension system.  If you dump and reload a DB containing an extension,
>> the extension definition that's fetched by CREATE EXTENSION is expected
>> to define (at least) all the objects that belonged to the extension in the
>> old DB.  You can't just randomly ALTER EXTENSION and not update the
>> extension definition script to match.

> The reason I add the dynamically-created tables to the extension is so that
> they are never included in the pg_dump output. If this is a gross abuse of
> the extension system, is there another way you can suggest to mark these
> tables as not-to-be-dumped?

The extension mechanism definitely isn't meant to do that ;-).  Maybe
you could put these not-to-dump tables in their own schema and exclude
that schema from pg_dump with -N?

            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

pgsql-bugs by date:

Previous
From: Moshe Jacobson
Date:
Subject: Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tablesbelonging to an extension
Next
From: Alvaro Herrera
Date:
Subject: Re: [BUGS] BUG #14456: pg_dump doesn't restore permissions on tablesbelonging to an extension