From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>
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 12:32:06 -0500
Message-ID: <5606.1548264726@sss.pgh.pa.us> (raw)
In-Reply-To: <20190123172328.b6trpdpcbzbq4unv@alap3.anarazel.de>
References: <20190123164734.cnt7ho34ygwsav7z@alap3.anarazel.de>
<201901231658.fls2whf2xypv@alvherre.pgsql>
<20190123172328.b6trpdpcbzbq4unv@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> On 2019-01-23 13:58:07 -0300, Alvaro Herrera wrote:
>> It does. How does pgindent behave with it?
> It craps out:
> Error@3649: Unbalanced parens
> Warning@3657: Extra )
> But that can be worked around with something like
> te = ArchiveEntry(fout, tdinfo->dobj.catId, tdinfo->dobj.dumpId,
> ARCHIVE_ARGS(.tag = tbinfo->dobj.name,
> .namespace = tbinfo->dobj.namespace->dobj.name,
> .owner = tbinfo->rolname,
> .desc = "TABLE DATA",
> .section = SECTION_DATA,
> .copyStmt = copyStmt,
> .deps = &(tbinfo->dobj.dumpId),
> .nDeps = 1,
> .dumpFn = dumpFn,
> .dumpArg = tdinfo,
> ));
> which looks mildly simpler too.
That looks fairly reasonable from here, but I'd suggest
ARCHIVE_OPTS rather than ARCHIVE_ARGS.
Can we omit the initial dots if we use a wrapper macro? Would it be
a good idea to do so (I'm not really sure)?
regards, tom lane
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: tgl@sss.pgh.pa.us, andres@anarazel.de, alvherre@2ndquadrant.com, 9erthalion6@gmail.com, amitdkhan.pg@gmail.com
Subject: Re: ArchiveEntry optional arguments refactoring
In-Reply-To: <5606.1548264726@sss.pgh.pa.us>
* 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