pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Aidan Van Dyk <aidan@highrise.ca>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Bruce Momjian <bruce@momjian.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: pgindent weirdness
Date: Wed, 20 Apr 2011 13:10:05 -0400
Message-ID: <13548.1303319405@sss.pgh.pa.us> (raw)
In-Reply-To: <BANLkTim7sY97Nr4qG5REjHzuxG-BQv=ovA@mail.gmail.com>
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>
	<BANLkTim7sY97Nr4qG5REjHzuxG-BQv=ovA@mail.gmail.com>

Aidan Van Dyk <aidan@highrise.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



view thread (51+ messages)  latest in thread

Message-ID: <13548.1303319405@sss.pgh.pa.us>
Permalink:  ../13548.1303319405@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/13548.1303319405@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-hackers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, aidan@highrise.ca, andrew@dunslane.net, bruce@momjian.us, robertmhaas@gmail.com
  Subject: Re: pgindent weirdness
  In-Reply-To: <13548.1303319405@sss.pgh.pa.us>
  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> <BANLkTim7sY97Nr4qG5REjHzuxG-BQv=ovA@mail.gmail.com> <13548.1303319405@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox