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

From David G. Johnston
Subject Re: pg_dump new feature: exporting functions only. Bad or good idea ?
Date
Msg-id CAKFQuwbnwF5EEJ5Ub1DN7bNMAoapdSD7TVhxHvmWQOXuFBq4sQ@mail.gmail.com
Whole thread Raw
In response to Re: pg_dump new feature: exporting functions only. Bad or good idea ?  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: pg_dump new feature: exporting functions only. Bad or good idea ?
List pgsql-hackers
On Fri, Mar 25, 2022 at 2:55 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Daniel Gustafsson <daniel@yesql.se> writes:
>> On 25 Mar 2022, at 19:37, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I'd vote for changing the behavior of --table rather than trying to
>> be bug-compatible with this decision.

> Agreed.  Question is what to do for "-t pg_class", should we still forbid
> dumping system catalogs when they are pattern matched without wildcard or is
> should that be ok? And should this depend on if "-n pg_catalog" is used?

I don't think there's anything really wrong with just "we won't dump
system objects, full stop"; I don't see much use-case for doing that
except maybe debugging, and even that is a pretty thin argument.

+1

We could bug-fix in a compromise if we felt compelled by a user complaint but I don't foresee any compelling ones for this.  The catalogs are implementation details that should never have been exposed in this manner in the first place.

If we want to choose the other position I would just go with "--[no]-system-objects" options to toggle whether pattern matching grabs them by default (defaulting to no) and if someone wants to enable them for only specific object types they can --system-objects and then --exclude-type='pg_catalog' any that shouldn't be enabled.

The documentation already says that the include options ignore -n/-N so the solution that breaks this rule seems less appealing at a cursory glance.

David J.

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [PATCH] Enable SSL library detection via PQsslAttribute
Next
From: Tom Lane
Date:
Subject: Re: pg_dump new feature: exporting functions only. Bad or good idea ?