From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andres Freund <andres@anarazel.de>
Cc: Hans Buschmann <buschmann@nidsa.net>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: Assorted improvements in pg_dump
Date: Mon, 25 Oct 2021 17:42:23 -0300
Message-ID: <202110252042.wyr6xsa42atg@alvherre.pgsql> (raw)
In-Reply-To: <4167039.1635192154@sss.pgh.pa.us>
On 2021-Oct-25, Tom Lane wrote:
> Yeah, I wasn't too happy with the static bools either. However, each
> function would need its own field in the struct, which seems like a
> maintenance annoyance, plus a big hazard for future copy-and-paste
> changes (ie, copy and paste the wrong flag name -> trouble). Also
> the Archive struct is shared between dump and restore cases, so
> adding a dozen fields that are irrelevant for restore didn't feel
> right. So I'd like a better idea, but I'm not sure that that one
> is better.
What about a separate struct passed from pg_dump's main() to the
functions that execute queries, containing a bunch of bools? This'd
still have the problem that mindless copy and paste would cause a bug,
but I wonder if that isn't overstated: if you use the wrong flag,
pg_dump would fail as soon as you try to invoke your query when it
hasn't been prepared yet.
--
Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/
"I'm impressed how quickly you are fixing this obscure issue. I came from
MS SQL and it would be hard for me to put into words how much of a better job
you all are doing on [PostgreSQL]."
Steve Midgley, http://archives.postgresql.org/pgsql-sql/2008-08/msg00000.php
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: pgsql-hackers@postgresql.org
Cc: alvherre@alvh.no-ip.org, tgl@sss.pgh.pa.us, andres@anarazel.de, buschmann@nidsa.net
Subject: Re: Assorted improvements in pg_dump
In-Reply-To: <202110252042.wyr6xsa42atg@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox