Re: [GENERAL] pg_dump -s dumps data?! - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [GENERAL] pg_dump -s dumps data?!
Date
Msg-id 22582.1328903667@sss.pgh.pa.us
Whole thread Raw
In response to Re: [GENERAL] pg_dump -s dumps data?!  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
I wrote:
> Now, back to the original subject of this thread: both HEAD and 9.1 are
> now operating as designed, in that they will dump the (user-provided
> portion of the) contents of an extension config table whenever that
> extension is dumped, even if --schema is specified.

Or so I thought, anyway.  Further experimentation with despez's example
shows that in HEAD, --schema is still able to block dumping of extension
config table contents, and the reason appears to be commit
a4cd6abcc901c1a8009c62a27f78696717bb8fe1, which added yet another set
of filtering conditions in a poorly chosen place; or possibly I should
say it made arbitrary changes in the definition of the --schema switch.
That patch needs some rethinking too, though I'm not sure what yet.

I also note that his example shows that if you have a selective dump
(say, with a -t switch), config table contents will be dumped even when
the owning extension is not.  This seems like a pretty clear bug:
getExtensionMembership should not be creating TableDataInfo objects for
extension config tables if the owning extension is not to be dumped.
Barring objections, I'll go fix and back-patch that.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Alex Hunsaker
Date:
Subject: Re: pl/perl and utf-8 in sql_ascii databases
Next
From: Josh Berkus
Date:
Subject: Re: Core Extensions relocation