Re: Proposal to include --exclude-extension Flag in pg_dump

Поиск
Список
Период
Сортировка
От Ayush Vatsa
Тема Re: Proposal to include --exclude-extension Flag in pg_dump
Дата
Msg-id CACX+KaN8+yE1S5VGTmt7uX=S6bUmkySv-JVephGyejcNSTaMdg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Proposal to include --exclude-extension Flag in pg_dump  (Dean Rasheed <dean.a.rasheed@gmail.com>)
Ответы Re: Proposal to include --exclude-extension Flag in pg_dump
Список 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.a.rasheed@gmail.com> wrote:
On Mon, 1 Jan 2024 at 13:28, Ayush Vatsa <ayushvatsa1810@gmail.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
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Improving EXPLAIN's display of SubPlan nodes
Следующее
От: "Andrey M. Borodin"
Дата:
Сообщение: Re: UUID v7