Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5Vjl-0004rF-Cg for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 17:40:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p5Vjk-0006nf-AN for pgsql-hackers@arkaria.postgresql.org; Wed, 14 Dec 2022 17:40:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5Vjk-0006nW-16 for pgsql-hackers@lists.postgresql.org; Wed, 14 Dec 2022 17:40:08 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p5Vjh-0003Z5-U6 for pgsql-hackers@postgresql.org; Wed, 14 Dec 2022 17:40:07 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 2BEHe3PZ2707472; Wed, 14 Dec 2022 12:40:03 -0500 From: Tom Lane To: Justin Pryzby cc: Peter Eisentraut , pgsql-hackers@postgresql.org Subject: Re: Common function for percent placeholder replacement In-reply-to: <20221214170521.GT27893@telsasoft.com> References: <5238bbed-0b01-83a6-d4b2-7eb0562a054e@enterprisedb.com> <20221214170521.GT27893@telsasoft.com> Comments: In-reply-to Justin Pryzby message dated "Wed, 14 Dec 2022 11:05:21 -0600" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2707470.1671039603.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 14 Dec 2022 12:40:03 -0500 Message-ID: <2707471.1671039603@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Justin Pryzby writes: > On Wed, Dec 14, 2022 at 08:31:02AM +0100, Peter Eisentraut wrote: >> + return replace_percent_placeholders(base_command, "df", (const char *= []){target_detail, filename}); > This is a "compound literal", which I gather is required by C99. > But I don't think that's currently being exercised, so I wonder if it's > going to break some BF members. It's pretty illegible, whatever it is. Could we maybe expend a few more keystrokes in favor of readability? regards, tom lane