Re: Extensions not dumped when --schema is used

2021-04-15 Thread Guillaume Lelarge
Le jeu. 15 avr. 2021 à 09:58, Michael Paquier a écrit : > On Wed, Apr 14, 2021 at 05:31:15AM -0700, Noah Misch wrote: > > The name "without_extension_explicit_schema" arose because that test > differs > > from the "without_extension" test by adding --schema=public. The test > named > >

Re: Extensions not dumped when --schema is used

2021-04-15 Thread Michael Paquier
On Wed, Apr 14, 2021 at 05:31:15AM -0700, Noah Misch wrote: > The name "without_extension_explicit_schema" arose because that test differs > from the "without_extension" test by adding --schema=public. The test named > "without_extension_implicit_schema" differs from "without_extension" by adding

Re: Extensions not dumped when --schema is used

2021-04-14 Thread Noah Misch
On Wed, Apr 14, 2021 at 10:38:17AM +0900, Michael Paquier wrote: > On Tue, Apr 13, 2021 at 08:00:34AM -0700, Noah Misch wrote: > > On Tue, Apr 13, 2021 at 02:43:11PM +0900, Michael Paquier wrote: > >>> - If extschema='public', "pg_dump -e plpgsql --schema=public" includes > >>> commands to dump

Re: Extensions not dumped when --schema is used

2021-04-13 Thread Michael Paquier
On Tue, Apr 13, 2021 at 08:00:34AM -0700, Noah Misch wrote: > On Tue, Apr 13, 2021 at 02:43:11PM +0900, Michael Paquier wrote: >>> - If extschema='public', "pg_dump -e plpgsql --schema=public" includes >>> commands to dump the relation data. This surprised me. (The >>> --schema=public

Re: Extensions not dumped when --schema is used

2021-04-13 Thread Noah Misch
On Tue, Apr 13, 2021 at 02:43:11PM +0900, Michael Paquier wrote: > On Sun, Apr 04, 2021 at 03:08:02PM -0700, Noah Misch wrote: > > I noticed the patch's behavior for relations that are members of non-dumped > > extensions and are also registered using pg_extension_config_dump(). It > > depends on

Re: Extensions not dumped when --schema is used

2021-04-12 Thread Michael Paquier
On Sun, Apr 04, 2021 at 03:08:02PM -0700, Noah Misch wrote: > I noticed the patch's behavior for relations that are members of non-dumped > extensions and are also registered using pg_extension_config_dump(). It > depends on the schema: > > - If extschema='public', "pg_dump -e plpgsql" makes no

Re: Extensions not dumped when --schema is used

2021-04-07 Thread Michael Paquier
On Wed, Apr 07, 2021 at 07:42:11PM -0700, Noah Misch wrote: > I think this is a bug in $SUBJECT. Sorry for the late reply. I intend to answer to that and this is registered as an open item, but I got busy with some other things. -- Michael signature.asc Description: PGP signature

Re: Extensions not dumped when --schema is used

2021-04-07 Thread Noah Misch
On Sun, Apr 04, 2021 at 03:08:02PM -0700, Noah Misch wrote: > On Wed, Mar 31, 2021 at 09:37:44AM +0900, Michael Paquier wrote: > > On Tue, Mar 30, 2021 at 12:02:45PM +0900, Michael Paquier wrote: > > > Okay. So I have looked at that stuff in details, and after fixing > > > all the issues reported

Re: Extensions not dumped when --schema is used

2021-04-04 Thread Noah Misch
On Wed, Mar 31, 2021 at 09:37:44AM +0900, Michael Paquier wrote: > On Tue, Mar 30, 2021 at 12:02:45PM +0900, Michael Paquier wrote: > > Okay. So I have looked at that stuff in details, and after fixing > > all the issues reported upthread in the code, docs and tests I am > > finishing with the

Re: Extensions not dumped when --schema is used

2021-03-31 Thread Guillaume Lelarge
Le mer. 31 mars 2021 à 02:37, Michael Paquier a écrit : > On Tue, Mar 30, 2021 at 12:02:45PM +0900, Michael Paquier wrote: > > Okay. So I have looked at that stuff in details, and after fixing > > all the issues reported upthread in the code, docs and tests I am > > finishing with the attached.

Re: Extensions not dumped when --schema is used

2021-03-30 Thread Michael Paquier
On Tue, Mar 30, 2021 at 12:02:45PM +0900, Michael Paquier wrote: > Okay. So I have looked at that stuff in details, and after fixing > all the issues reported upthread in the code, docs and tests I am > finishing with the attached. The tests have been moved out of > src/bin/pg_dump/ to

Re: Extensions not dumped when --schema is used

2021-03-29 Thread Michael Paquier
On Mon, Mar 15, 2021 at 11:37:02AM +0100, Guillaume Lelarge wrote: > Anyways. Yeah, I know we're near feature freeze. This feature would be nice > to have, but I don't feel strongly about it. I think this feature is > currently lacking in PostgreSQL but I don't much care if it makes it to 14 > or

Re: Extensions not dumped when --schema is used

2021-03-15 Thread Guillaume Lelarge
Le lun. 15 mars 2021 à 11:32, Julien Rouhaud a écrit : > Le lun. 15 mars 2021 à 18:25, Michael Paquier a > écrit : > >> On Mon, Mar 15, 2021 at 06:21:55PM +0800, Julien Rouhaud wrote: >> > Is that a feature you really want to see in pg14? If yes and if you're >> sure >> > you won't have time

Re: Extensions not dumped when --schema is used

2021-03-15 Thread Julien Rouhaud
Le lun. 15 mars 2021 à 18:25, Michael Paquier a écrit : > On Mon, Mar 15, 2021 at 06:21:55PM +0800, Julien Rouhaud wrote: > > Is that a feature you really want to see in pg14? If yes and if you're > sure > > you won't have time to work on the patch within 2 weeks I can take care > of > >

Re: Extensions not dumped when --schema is used

2021-03-15 Thread Michael Paquier
On Mon, Mar 15, 2021 at 06:21:55PM +0800, Julien Rouhaud wrote: > Is that a feature you really want to see in pg14? If yes and if you're sure > you won't have time to work on the patch within 2 weeks I can take care of > addressing all comments. A lot of things will depend on the feature freeze

Re: Extensions not dumped when --schema is used

2021-03-15 Thread Julien Rouhaud
On Mon, Mar 15, 2021 at 09:19:19AM +0100, Guillaume Lelarge wrote: > Le lun. 15 mars 2021 à 06:00, Michael Paquier a > écrit : > > > On Sun, Feb 21, 2021 at 08:14:45AM +0900, Michael Paquier wrote: > > > Okay, that sounds fine to me. Thanks for confirming. > > > > Guillaume, it has been a

Re: Extensions not dumped when --schema is used

2021-03-15 Thread Guillaume Lelarge
Le lun. 15 mars 2021 à 06:00, Michael Paquier a écrit : > On Sun, Feb 21, 2021 at 08:14:45AM +0900, Michael Paquier wrote: > > Okay, that sounds fine to me. Thanks for confirming. > > Guillaume, it has been a couple of weeks since your last update. Are > you planning to send a new version of

Re: Extensions not dumped when --schema is used

2021-03-14 Thread Michael Paquier
On Sun, Feb 21, 2021 at 08:14:45AM +0900, Michael Paquier wrote: > Okay, that sounds fine to me. Thanks for confirming. Guillaume, it has been a couple of weeks since your last update. Are you planning to send a new version of the patch? -- Michael signature.asc Description: PGP signature

Re: Extensions not dumped when --schema is used

2021-02-21 Thread David Fetter
On Thu, Feb 18, 2021 at 11:13:06AM +0100, Guillaume Lelarge wrote: > Le mar. 26 janv. 2021 à 13:42, Guillaume Lelarge a > écrit : > > > Le mar. 26 janv. 2021 à 13:41, Guillaume Lelarge > > a écrit : > > > >> Le mar. 26 janv. 2021 à 05:10, Julien Rouhaud a > >> écrit : > >> > >>> On Mon, Jan

Re: Extensions not dumped when --schema is used

2021-02-20 Thread Michael Paquier
On Sat, Feb 20, 2021 at 10:39:24PM +0100, Guillaume Lelarge wrote: > Le sam. 20 févr. 2021 à 17:31, Tom Lane a écrit : >> I haven't read the patch, but the behavior I would expect is: >> >> 1. If --extension=pattern is given, then extensions matching the >> pattern are included in the dump,

Re: Extensions not dumped when --schema is used

2021-02-20 Thread Guillaume Lelarge
Le sam. 20 févr. 2021 à 17:31, Tom Lane a écrit : > Michael Paquier writes: > > As presented in this patch, specifying both --extension and > > --table/--schema means that pg_dump will dump both tables and > > extensions matching the pattern passed down. But shouldn't extensions > > not be

Re: Extensions not dumped when --schema is used

2021-02-20 Thread Guillaume Lelarge
Le sam. 20 févr. 2021 à 13:25, Michael Paquier a écrit : > On Thu, Feb 18, 2021 at 11:13:06AM +0100, Guillaume Lelarge wrote: > > I finally managed to get a working TAP test for my patch. I have no idea > if > > it's good, and if it's enough. Anyway, new version of the patch attached. > > As

Re: Extensions not dumped when --schema is used

2021-02-20 Thread Tom Lane
Michael Paquier writes: > As presented in this patch, specifying both --extension and > --table/--schema means that pg_dump will dump both tables and > extensions matching the pattern passed down. But shouldn't extensions > not be dumped if --table or --schema is used? Combining --schema with >

Re: Extensions not dumped when --schema is used

2021-02-20 Thread Michael Paquier
On Thu, Feb 18, 2021 at 11:13:06AM +0100, Guillaume Lelarge wrote: > I finally managed to get a working TAP test for my patch. I have no idea if > it's good, and if it's enough. Anyway, new version of the patch attached. As presented in this patch, specifying both --extension and --table/--schema

Re: Extensions not dumped when --schema is used

2021-02-18 Thread Guillaume Lelarge
Le mar. 26 janv. 2021 à 13:42, Guillaume Lelarge a écrit : > Le mar. 26 janv. 2021 à 13:41, Guillaume Lelarge > a écrit : > >> Le mar. 26 janv. 2021 à 05:10, Julien Rouhaud a >> écrit : >> >>> On Mon, Jan 25, 2021 at 9:34 PM Guillaume Lelarge >>> wrote: >>> > >>> > "Anytime soon" was a long

Re: Extensions not dumped when --schema is used

2021-02-03 Thread Guillaume Lelarge
Hi, Thanks for the review. Le mer. 3 févr. 2021 à 18:33, Asif Rehman a écrit : > The following review has been posted through the commitfest application: > make installcheck-world: tested, passed > Implements feature: tested, passed > Spec compliant: not tested >

Re: Extensions not dumped when --schema is used

2021-02-03 Thread Asif Rehman
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested The patch applies cleanly and looks fine to me. However consider

Re: Extensions not dumped when --schema is used

2021-01-26 Thread Guillaume Lelarge
Le mar. 26 janv. 2021 à 13:41, Guillaume Lelarge a écrit : > Le mar. 26 janv. 2021 à 05:10, Julien Rouhaud a > écrit : > >> On Mon, Jan 25, 2021 at 9:34 PM Guillaume Lelarge >> wrote: >> > >> > "Anytime soon" was a long long time ago, and I eventually completely >> forgot this, sorry. As

Re: Extensions not dumped when --schema is used

2021-01-26 Thread Guillaume Lelarge
Le mar. 26 janv. 2021 à 05:10, Julien Rouhaud a écrit : > On Mon, Jan 25, 2021 at 9:34 PM Guillaume Lelarge > wrote: > > > > "Anytime soon" was a long long time ago, and I eventually completely > forgot this, sorry. As nobody worked on it yet, I took a shot at it. See > attached patch. > >

Re: Extensions not dumped when --schema is used

2021-01-25 Thread Julien Rouhaud
On Mon, Jan 25, 2021 at 9:34 PM Guillaume Lelarge wrote: > > "Anytime soon" was a long long time ago, and I eventually completely forgot > this, sorry. As nobody worked on it yet, I took a shot at it. See attached > patch. Great! I didn't reviewed it thoroughly yet, but after a quick look it

Re: Extensions not dumped when --schema is used

2021-01-25 Thread Guillaume Lelarge
Hi, Le sam. 23 mai 2020 à 14:53, Guillaume Lelarge a écrit : > Le mer. 20 mai 2020 à 16:39, Tom Lane a écrit : > >> Guillaume Lelarge writes: >> > Le mer. 20 mai 2020 à 11:26, Daniel Gustafsson a >> écrit : >> >> The question is what --extensions should do: only dump any >> >> extensions

Re: Extensions not dumped when --schema is used

2020-05-23 Thread Guillaume Lelarge
Le mer. 20 mai 2020 à 16:39, Tom Lane a écrit : > Guillaume Lelarge writes: > > Le mer. 20 mai 2020 à 11:26, Daniel Gustafsson a > écrit : > >> The question is what --extensions should do: only dump any > >> extensions that objects in the schema depend on; require a pattern and > only > >>

Re: Extensions not dumped when --schema is used

2020-05-20 Thread Tom Lane
Guillaume Lelarge writes: > Le mer. 20 mai 2020 à 11:26, Daniel Gustafsson a écrit : >> The question is what --extensions should do: only dump any >> extensions that objects in the schema depend on; require a pattern and only >> dump matching extensions; dump all extensions (probably not) or

Re: Extensions not dumped when --schema is used

2020-05-20 Thread Daniel Gustafsson
> On 20 May 2020, at 11:38, Guillaume Lelarge wrote: > Actually, "dump all extensions" (#3) would make sense to me, and has my vote. Wouldn't that open for another set of problems when running with --schema=bar and getting errors on restoring for relocatable extensions like these:

Re: Extensions not dumped when --schema is used

2020-05-20 Thread Guillaume Lelarge
Le mer. 20 mai 2020 à 11:26, Daniel Gustafsson a écrit : > > On 20 May 2020, at 10:06, Guillaume Lelarge > wrote: > > > I was wondering the reason behind this choice. If anyone knows, I'd be > happy to hear about it. > > Extensions were dumped unconditionally in the beginning, but it was >

Re: Extensions not dumped when --schema is used

2020-05-20 Thread Daniel Gustafsson
> On 20 May 2020, at 10:06, Guillaume Lelarge wrote: > I was wondering the reason behind this choice. If anyone knows, I'd be happy > to hear about it. Extensions were dumped unconditionally in the beginning, but it was changed to match how procedural language definitions were dumped. > *

Re: Extensions not dumped when --schema is used

2020-05-20 Thread Laurenz Albe
On Wed, 2020-05-20 at 10:06 +0200, Guillaume Lelarge wrote: > I've discovered something today that I didn't really expect. > When a user dumps a database with the --schema flag of pg_dump, > extensions in this schema aren't dumped. As far as I can tell, > the documentation isn't clear about this

Extensions not dumped when --schema is used

2020-05-20 Thread Guillaume Lelarge
Hello, I've discovered something today that I didn't really expect. When a user dumps a database with the --schema flag of pg_dump, extensions in this schema aren't dumped. As far as I can tell, the documentation isn't clear about this ("Dump only schemas matching pattern; this selects both the