Re: pg_dump new feature: exporting functions only. Bad or good idea ?

From: Laetitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Daniel Gustafsson <daniel(at)yesql(dot)se>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Ryan Lambert <ryan(at)rustprooflabs(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, ahsan hadi <ahsan(dot)hadi(at)gmail(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: pg_dump new feature: exporting functions only. Bad or good idea ?
Date: 2022-03-26 08:53:19
Message-ID: CAB_COdjwKW5gLJKUp4RAgWcAY7-Xbq2aZjx3=CuUEKV5UQgAbA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello all,

Le sam. 26 mars 2022 à 01:13, Michael Paquier <michael(at)paquier(dot)xyz> a
écrit :

> On Fri, Mar 25, 2022 at 10:09:33PM +0100, Daniel Gustafsson wrote:
> > Agreed. In this case it seems that adding --exclude-extension would
> make sense
> > to keep conistency. I took a quick stab at doing so with the attached
> while
> > we're here.
>
> src/test/modules/test_pg_dump would be the best place for the addition
> of a couple of tests with this new switch. Better to check as well
> what happens when a command collides with --extension and
> --exclude-extension.
>
> printf(_(" -e, --extension=PATTERN dump the specified
> extension(s) only\n"));
> + printf(_(" --exclude-extension=PATTERN do NOT dump the specified
> extension(s)\n"));
> Shouldn't this be listed closer to --exclude-table-data in the --help
> output?
>

I think it's time to sum up what we want to do:

- We'd like to use switches to export objects according to a pattern.
- For each object type we will have an --object=PATTERN flag and a
--exclude-object=PATTERN
- Having a short flag for each of the long flags is not mandatory
- The object types that pg_dump can select so far are:
- table (already written)
- schema (already written)
- extension (half-written, --exclude-extension not written)
- routine (TBD ASAP). Routine flag operates on stored functions, stored
procedures, aggregate functions, and window functions.
- By default, pg_dump does not export system objects but we found out that
we could use --table='pg_catalog.*' to export them. This is a bug and will
be fixed. pg_dump won't have the ability to export any system object
anymore. Should the fix belong to that patch or do I need to create a
separate patch? (Seems to me it should be separated)

If everyone is ok with the points above, I'll write both patches.

Have a nice day,

Lætitia

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2022-03-26 09:03:55 Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.
Previous Message Julien Rouhaud 2022-03-26 08:24:08 Re: BUG #17448: In Windows 10, version 1703 and later, huge_pages doesn't work.