Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 8DFC1133616B for ; Wed, 20 Apr 2011 18:29:42 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 50056-02 for ; Wed, 20 Apr 2011 21:29:23 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id E0AFB1337B83 for ; Wed, 20 Apr 2011 18:29:22 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p3KLTLvX018676; Wed, 20 Apr 2011 17:29:21 -0400 (EDT) To: Andrew Dunstan cc: Bruce Momjian , Robert Haas , pgsql-hackers@postgresql.org Subject: Re: pgindent weirdness In-reply-to: <4DAF4AAF.9040709@dunslane.net> References: <201104202028.p3KKSYX18339@momjian.us> <4DAF4AAF.9040709@dunslane.net> Comments: In-reply-to Andrew Dunstan message dated "Wed, 20 Apr 2011 17:05:51 -0400" Date: Wed, 20 Apr 2011 17:29:20 -0400 Message-ID: <18675.1303334960@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201104/1103 X-Sequence-Number: 186305 Andrew Dunstan writes: > On 04/20/2011 04:28 PM, Bruce Momjian wrote: >> So the list of possible additions Andrew supplied are cases where we >> never reference those typedefs --- seems like a cleanup opportunity. > I think the best cleanup idea is Aidan's, namely is we have declared > "typdef struct foo { ... } foo;" we should use "foo" in the code > instead of "struct foo". Then the typedef will be referenced, and the > code will be cleaner, and we won't run into the pgindent "struct" bug > either, so it's a win/win/win. We want to do that in any case. I think that Bruce was suggesting going further and actively removing unreferenced struct tags from the declaration sites. I'm less enthused about that. It would save nothing except some probably-unmeasurable amount of compile time, and it'd result in a lot of diffs that might come back to bite future back-patching efforts. regards, tom lane