Re: pg_dump new feature: exporting functions only. Bad or good idea ? - Mailing list pgsql-hackers

From Tom Lane
Subject Re: pg_dump new feature: exporting functions only. Bad or good idea ?
Date
Msg-id 3166751.1648168819@sss.pgh.pa.us
Whole thread Raw
In response to Re: pg_dump new feature: exporting functions only. Bad or good idea ?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Responses Re: pg_dump new feature: exporting functions only. Bad or good idea ?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Re: pg_dump new feature: exporting functions only. Bad or good idea ?  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
"David G. Johnston" <david.g.johnston@gmail.com> writes:
> The extension object type does not seem to have gotten the
> --exclude-extension capability that it would need to conform to the general
> design exemplified by --table and hopefully extended out to the routine
> object types.

We're not going to instantly build out every feature that would be
suggested by a roadmap.  However, I see in what you just wrote
a plausible roadmap: eventually, all or most object types should
have pg_dump switches comparable to, and syntactically aligned
with, the --table and --exclude-table switches.  The expectation
would be that if any of these selective-dump switches appear,
then only objects matching at least one of them (and not matching
any --exclude switch) will be dumped.  So for example

    pg_dump --table=foo* --function=bar*

dumps tables whose names start with foo, and functions whose
names start with bar, and nothing else.  (We'd need to spell out
how these things interact with --schema, too.)

In this scheme, Lætitia's desired functionality should be spelled
"--function=*", or possibly "--routine=*", depending on what she
wanted to happen with procedures.

Thoughts?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Corruption during WAL replay
Next
From: Japin Li
Date:
Subject: Re: [PATCH] add relation and block-level filtering to pg_waldump