From: | Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com> |
---|---|
To: | Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> |
Cc: | Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Proposal to include --exclude-extension Flag in pg_dump |
Date: | 2024-03-16 17:36:31 |
Message-ID: | CACX+KaN8+yE1S5VGTmt7uX=S6bUmkySv-JVephGyejcNSTaMdg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
> In my opinion the order of options in pg_dump.sgml and the --help
> output is fine. Keeping this new option together with -e/--extension
> makes it easier to see, while otherwise it would get lost much further
> down.
I agree with your suggestion, so I'll maintain the original order as
proposed.
> The --filter option should be extended to support "exclude
> extension pattern" lines in the filter file. That syntax is already
> accepted, but it throws a not-supported error, but it's hopefully not
> too hard to make that work now.
While proposing the --exclude-extension flag in pg_dump, the --filter
option
wasn't there, so it got overlooked. But now that I've familiarized myself
with it
and have tried to enhance its functionality with exclude-extension in the
provided patch. Thank you for bringing this to my attention.
> It ought to have some tests in the test script.
Correct, I must have added it in the first patch itself.
As a newcomer to the database, I explored how testing works and tried
to include test cases for the newly added flag. I've confirmed that all
test
cases, including the ones I added, are passing.
Attached is the complete patch with all the required code changes.
Looking forward to your review and feedback.
On Wed, 6 Mar 2024 at 16:04, Dean Rasheed <dean(dot)a(dot)rasheed(at)gmail(dot)com> wrote:
> On Mon, 1 Jan 2024 at 13:28, Ayush Vatsa <ayushvatsa1810(at)gmail(dot)com> wrote:
> >
> > According to the documentation of pg_dump when the --extension option is
> not specified, all non-system extensions in the target database will get
> dumped.
> > > Why do we need to explicitly exclude extensions?
> > Hence to include only a few we use --extension, but to exclude a few I
> am proposing --exclude-extension.
> >
>
> Thanks for working on this. It seems like a useful feature to have.
> The code changes look good, and it appears to work as expected.
>
> In my opinion the order of options in pg_dump.sgml and the --help
> output is fine. Keeping this new option together with -e/--extension
> makes it easier to see, while otherwise it would get lost much further
> down. Other opinions on that might differ though.
>
> There are a couple of things missing from the patch, that should be added:
>
> 1). The --filter option should be extended to support "exclude
> extension pattern" lines in the filter file. That syntax is already
> accepted, but it throws a not-supported error, but it's hopefully not
> too hard to make that work now.
>
> 2). It ought to have some tests in the test script.
>
> Regards,
> Dean
>
Attachment | Content-Type | Size |
---|---|---|
v2-0001-Add-support-for-exclude-extension-in-pg_dump.patch | application/octet-stream | 11.5 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrey M. Borodin | 2024-03-16 17:43:54 | Re: UUID v7 |
Previous Message | Tom Lane | 2024-03-16 17:25:07 | Re: Improving EXPLAIN's display of SubPlan nodes |