Re: pgindent weirdness

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Aidan Van Dyk <aidan(at)highrise(dot)ca>, Bruce Momjian <bruce(at)momjian(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pgindent weirdness
Date: 2011-04-20 18:25:47
Message-ID: 4DAF252B.7010800@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 04/20/2011 01:10 PM, Tom Lane wrote:
> Aidan Van Dyk<aidan(at)highrise(dot)ca> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Josh Berkus 2011-04-20 18:39:47 Re: Formatting Curmudgeons WAS: MMAP Buffers
Previous Message David Fetter 2011-04-20 18:23:44 Re: pgbench \for or similar loop