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>, Ryan Lambert <ryan(at)rustprooflabs(dot)com>, Tomas Vondra <tomas(dot)vondra(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, 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-25 16:23:36
Message-ID: CAB_COdgyJOjoxBOHpnVyNNaCx7SGphtNdHrmFv7GSGU4H9eAcQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello Michael,

Le mar. 25 janv. 2022 à 06:49, Michael Paquier <michael(at)paquier(dot)xyz> a
écrit :

> On Tue, Nov 09, 2021 at 03:23:07PM +0100, Daniel Gustafsson wrote:
> > Looking at this thread I think it makes sense to go ahead with this
> patch. The
> > filter functionality worked on in another thread is dealing with
> cherry-picking
> > certain objects where this is an all-or-nothing switch, so I don't think
> they
> > are at odds with each other.
>
> Including both procedures and functions sounds natural from here. Now
> I have a different question, something that has not been discussed in
> this thread at all. What about patterns? Switches like --table or
> --extension are able to digest a psql-like pattern to decide which
> objects to dump. Is there a reason not to have this capability for
> this new switch with procedure names? I mean to handle the case
> without the function arguments, even if the same name is used by
> multiple functions with different arguments.
>

Thank you for this suggestion.
We have --schema-only flag to export only the structure and then we have
--schema=<pattern> flag to export the schemas following a pattern.
I don't think both features can't exist for functions (and stored
procedures), but I see them as different features. We could have
--functions-only and --function=<pattern>.
In my humble opinion, the lack of --function=<pattern> feature should block
this patch.

Have a great day,
Lætitia

> --
> Michael
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Laetitia Avrot 2022-03-25 16:25:01 Re: pg_dump new feature: exporting functions only. Bad or good idea ?
Previous Message Robert Haas 2022-03-25 16:22:09 Re: pgsql: Add 'basebackup_to_shell' contrib module.