Re: pgindent weirdness

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Aidan Van Dyk <aidan(at)highrise(dot)ca>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, 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 17:10:05
Message-ID: 13548.1303319405@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-04-20 17:10:19 Re: pg_dump --binary-upgrade vs. ALTER TYPE ... DROP ATTRIBUTE
Previous Message Aidan Van Dyk 2011-04-20 17:03:14 Re: pgindent weirdness