Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmMNy-0000WS-Em for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Jan 2019 17:32:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gmMNx-0006oe-6e for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Jan 2019 17:32:21 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmMNw-0006oX-VW for pgsql-hackers@lists.postgresql.org; Wed, 23 Jan 2019 17:32:21 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gmMNq-00024I-F8 for pgsql-hackers@postgresql.org; Wed, 23 Jan 2019 17:32:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x0NHW6Jn005607; Wed, 23 Jan 2019 12:32:06 -0500 From: Tom Lane To: Andres Freund cc: Alvaro Herrera , Dmitry Dolgov <9erthalion6@gmail.com>, Amit Khandekar , PostgreSQL-development Subject: Re: ArchiveEntry optional arguments refactoring In-reply-to: <20190123172328.b6trpdpcbzbq4unv@alap3.anarazel.de> References: <20190123164734.cnt7ho34ygwsav7z@alap3.anarazel.de> <201901231658.fls2whf2xypv@alvherre.pgsql> <20190123172328.b6trpdpcbzbq4unv@alap3.anarazel.de> Comments: In-reply-to Andres Freund message dated "Wed, 23 Jan 2019 09:23:28 -0800" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <5605.1548264726.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 23 Jan 2019 12:32:06 -0500 Message-ID: <5606.1548264726@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andres Freund 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 =3D ArchiveEntry(fout, tdinfo->dobj.catId, tdinfo->dobj.dumpI= d, > ARCHIVE_ARGS(.tag =3D tbinfo->dobj.name, > .namespace =3D tbinfo->dobj.names= pace->dobj.name, > .owner =3D tbinfo->rolname, > .desc =3D "TABLE DATA", > .section =3D SECTION_DATA, > .copyStmt =3D copyStmt, > .deps =3D &(tbinfo->dobj.dumpId), > .nDeps =3D 1, > .dumpFn =3D dumpFn, > .dumpArg =3D 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