public inbox for [email protected]
help / color / mirror / Atom feedFrom: Gilles Darold <[email protected]>
To: Tom Lane <[email protected]>
To: Gilles Darold <[email protected]>
Cc: [email protected]
Subject: Re: [Proposal] Allow pg_dump to include all child tables with the root table
Date: Sun, 5 Mar 2023 08:03:33 +0000
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<167727895770.12579.12160318039902297475.pgcf@coridan.postgresql.org>
<CA+gpmf+ciusFs1Ui8cB13HHfuxvhn5Vg+gV3kzHmka_jvQP96Q@mail.gmail.com>
<[email protected]>
<[email protected]>
Le 04/03/2023 à 19:18, Tom Lane a écrit :
> Gilles Darold <[email protected]> writes:
>> But I disagree the use of --table-with-childs and
>> --exclude-table-with-childs because we already have the --table and
>> --exclude-table, and it will add lot of code where we just need a switch
>> to include children tables.
> I quite dislike the idea of a separate --with-whatever switch, because
> it will (presumably) apply to all of your --table and --exclude-table
> switches, where you may need it to apply to just some of them.
> Spelling considerations aside, attaching the property to the
> individual switches seems far superior. And I neither believe that
> this would add a lot of code, nor accept that as an excuse even if
> it's true.y..
Right, this is not a lot of code but just more code where I think we
just need a switch. I much prefer that it applies to all --table /
--exclude-table because this is generally the behavior we want for all
root/parent tables. But I agree that in some cases users could want that
this behavior applies to some selected tables only so the proposed new
options can answer to this need. Even if generally in similar cases
several pg_dump commands can be used. This is just my opinion, I will
adapt the patch to use the proposed new options.
But, what do you think about having pg_dump default to dump children
tables with --table / --exclude-table? I was very surprised that this
was not the case the first time I see that. In this case we could add
--[exclude-]table-no-child-tables. I think this form will be less used
than the form where we need the child tables to be dump with the parent
table, meaning that most of the time pg_dump commands using --table and
--exclude-table will be kept untouched and those using more regexp to
dump child tables could be simplified. I'm not sure that the backward
compatibility is an argument here to not change the default behavior of
pg_dump.
--
Gilles
--
Gilles Darold
view thread (6+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected]
Subject: Re: [Proposal] Allow pg_dump to include all child tables with the root table
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox