Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0wgD-0000TK-J2 for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Mar 2018 22:02:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1f0wgB-0005B2-FC for pgsql-hackers@arkaria.postgresql.org; Tue, 27 Mar 2018 22:02:55 +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_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0wgB-0005At-6T for pgsql-hackers@lists.postgresql.org; Tue, 27 Mar 2018 22:02:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1f0wg7-0000DD-Bb for pgsql-hackers@lists.postgresql.org; Tue, 27 Mar 2018 22:02:54 +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 w2RM2lto000504; Tue, 27 Mar 2018 18:02:47 -0400 From: Tom Lane To: Andrew Dunstan cc: pgsql-hackers@lists.postgresql.org Subject: Re: Undesirable entries in typedefs list In-reply-to: References: <28690.1521912334@sss.pgh.pa.us> Comments: In-reply-to Andrew Dunstan message dated "Mon, 26 Mar 2018 11:13:21 +1030" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <502.1522188167.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Tue, 27 Mar 2018 18:02:47 -0400 Message-ID: <503.1522188167@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrew Dunstan writes: >> pgindent already has a list of blacklisted typedefs (see lines 121 to 1= 23) Oh, so it does. > Here's a patch to pgindent which I think will do what you want fairly > simply, assuming you have identified all the offending tokens. Hm, this does not work for me (with perl 5.10.1), I get syntax errors like Not enough arguments for map at src/tools/pgindent/pgindent line 64, near = "abs allocfunc iterator other pointer printfunc reference string type )" (Might be a runaway multi-line () string starting on line 63) syntax error at src/tools/pgindent/pgindent line 64, near "abs allocfunc i= terator other pointer printfunc reference string type )" Execution of src/tools/pgindent/pgindent aborted due to compilation errors= . After reading the perlfunc man page I changed -my %blacklist =3D map { "$_\n" =3D> 1 } +my %blacklist =3D map { +"$_\n" =3D> 1 } and then it seems to work, but man this is an ugly language :-( regards, tom lane