From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Amit Khandekar <amitdkhan.pg@gmail.com>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: ArchiveEntry optional arguments refactoring
Date: Wed, 23 Jan 2019 13:58:07 -0300
Message-ID: <201901231658.fls2whf2xypv@alvherre.pgsql> (raw)
In-Reply-To: <20190123164734.cnt7ho34ygwsav7z@alap3.anarazel.de>
Hello
On 2019-Jan-23, Andres Freund wrote:
> > All the arguments, except Archive, CatalogId and DumpId I've moved
> > into the ArchiveOpts structure. Not all of them could be empty before, but
> > anyway it seems better for consistency and readability. Some of the arguments
> > had empty string as a default value, I haven't changed anything here yet
> > (although this mixture of NULL and "" in ArchiveEntry looks a bit confusing).
>
> Probably worth changing at the same time, if we decide to go for it.
>
> To me this does look like it'd be more maintainable going forward.
It does. How does pgindent behave with it?
I'd use ArchiveEntryOpts as struct name; ArchiveOpts sounds wrong. Also,
the struct members could use better names -- "defn" for example could
perhaps be "createStmt" (to match dropStmt/copyStmt), and expand "desc"
to "description".
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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@2ndquadrant.com, andres@anarazel.de, 9erthalion6@gmail.com, tgl@sss.pgh.pa.us, amitdkhan.pg@gmail.com
Subject: Re: ArchiveEntry optional arguments refactoring
In-Reply-To: <201901231658.fls2whf2xypv@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