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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Chapman Flack <chap(at)anastigmatix(dot)net>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Lætitia Avrot <laetitia(dot)avrot(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Vik Fearing <vik(at)postgresfriends(dot)org>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: pg_dump new feature: exporting functions only. Bad or good idea ?
Date: 2022-03-25 00:16:47
Message-ID: CAKFQuwYcw+A+MyDQoVahKkEqJtgih3c1i-JLY_YPMucNfgQDkg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Mar 24, 2022 at 4:42 PM Chapman Flack <chap(at)anastigmatix(dot)net> wrote:

> On 03/27/21 08:57, Andrew Dunstan wrote:
> > We can bikeshed the name of the flag at some stage. --procedures-only
> > might also make sense
>
> Any takers for --routines-only ?
>
> "Routine" is the genuine, ISO SQL umbrella term for a function or
> procedure, and we have used it that way in our docs and glossary.
>
>
Regardless of the prefix name choice neither blobs, tables, nor schemas use
the "-only" suffix so I don't see that this should. I have no issue if we
add three options for this: --routine/--procedure/--function (these are
singular because --table and --schema are singular)

--blobs and --no-blobs are special so let us just build off of the API
already implemented for --table/--exclude-table

No short option is required, and honestly I don't think it is worthwhile to
take up short options for this, acknowledging that we are leaving -t/-T
(and -n/-N) in place for legacy support.

--blobs reacts to these additional object types in the same manner that it
reacts to --table. As soon as any of these object type inclusion options
is specified nothing except the options that are specified will be output.
Both data and schema, though, for most object types, data is not relevant.
If schema is not output then options that control schema content objects
only are ignored.

The --exclude-* options behave in the same way as defined for -t/-T,
specifically the note in -T about when both are present.

As with tables, the affirmative version of these overrides any --schema
(-n/-N) specification provided. But the --exclude-* versions of these do
omit the named objects from the dump should they have been selected by
--schema.

David J.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2022-03-25 00:25:45 Re: pg_dump new feature: exporting functions only. Bad or good idea ?
Previous Message Tomas Vondra 2022-03-25 00:14:48 Re: Column Filtering in Logical Replication