Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 24A771337B54 for ; Wed, 20 Apr 2011 15:25:56 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 02667-01 for ; Wed, 20 Apr 2011 18:25:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from cdptpa-omtalb.mail.rr.com (cdptpa-omtalb.mail.rr.com [75.180.132.123]) by mail.postgresql.org (Postfix) with ESMTP id 158FF1337C07 for ; Wed, 20 Apr 2011 15:25:47 -0300 (ADT) X-Authority-Analysis: v=1.1 cv=iNGAwgbhgycWJLi8POkSIlT3dR7ZbIoImwFDelgsXY0= c=1 sm=0 a=lpDWfFNTT9MA:10 a=Acs96HtBqXsA:10 a=8nJEP1OIZ-IA:10 a=qCTYjJJ2g1SgQhsHZAUATw==:17 a=65wvpH0BO287VsvOSHEA:9 a=d-ftyoXbyfyDzRpWD04A:7 a=wPNLvfGTeEIA:10 a=qCTYjJJ2g1SgQhsHZAUATw==:117 X-Cloudmark-Score: 0 X-Originating-IP: 98.27.48.207 Received: from [98.27.48.207] ([98.27.48.207:50512] helo=[192.168.10.146]) by cdptpa-oedge02.mail.rr.com (envelope-from ) (ecelerity 2.2.3.46 r()) with ESMTP id E6/08-16352-B252FAD4; Wed, 20 Apr 2011 18:25:47 +0000 Message-ID: <4DAF252B.7010800@dunslane.net> Date: Wed, 20 Apr 2011 14:25:47 -0400 From: Andrew Dunstan User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Lightning/1.0b3pre Thunderbird/3.1.9 MIME-Version: 1.0 To: Tom Lane CC: Aidan Van Dyk , Bruce Momjian , Robert Haas , pgsql-hackers@postgresql.org Subject: Re: pgindent weirdness References: <201104200948.p3K9mY501163@momjian.us> <4DAEF8AB.5030103@dunslane.net> <27646.1303314228@sss.pgh.pa.us> <4DAF086F.6050305@dunslane.net> <28426.1303316942@sss.pgh.pa.us> <4DAF0C21.2070505@dunslane.net> <13548.1303319405@sss.pgh.pa.us> In-Reply-To: <13548.1303319405@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-5 required=5 tests=BAYES_00=-1.9, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201104/1069 X-Sequence-Number: 186271 On 04/20/2011 01:10 PM, Tom Lane wrote: > Aidan Van Dyk writes: >> Since the general form seems to be to declare things as: >> typedef struct foo { ... } foo; >> Is there any reason why we see any struct foo in the sources other >> than in the typedef line? > It gives an escape hatch in case you need a forward reference to the > struct, ie you can do "struct foo *" even before this. But I agree that > 90% of those struct tags are useless, and so the habit of tagging every > typedef this way is mostly legacy. > > Yeah, I think it would be reasonable to remove lots of them, especially in argument lists where I think they're a bit ugly anyway. I'm not sure if now is a good time to be doing that sort of cleanup - maybe we should just add the typedefs we think we're missing to the typedefs list and try another pgindent run, and then make these changes early in 9.2 dev cycle. cheers andrew