From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: pgindent weirdness
Date: Wed, 20 Apr 2011 11:50:59 -0400 (EDT)
Message-ID: <201104201550.p3KFoxA17469@momjian.us> (raw)
In-Reply-To: <27646.1303314228@sss.pgh.pa.us>
Tom Lane wrote:
> Andrew Dunstan <andrew@dunslane.net> writes:
> > On 04/20/2011 05:48 AM, Bruce Momjian wrote:
> >> BulkInsertStateData is not listed in the typedef list supplied by
> >> Andrew; see src/tools/pgindent/typedefs.list. CC'ing him. This might
> >> be because the typdef is listed in two files:
>
> > It's tagged as a structure type by objdump, but not as a typedef:
>
> Hmm. hio.h clearly declares it as both, but many object files probably
> include only heapam.h, which exposes only the struct name. I'm guessing
> that you are merging the results from objdump'ing different files in a
> way that fails to consider the possibility of some files knowing more
> versions of a symbol than others.
>
> Now having said that, there seems to be a pgindent bug here too, in that
> it's throwing a space into
>
> Buffer
> RelationGetBufferForTuple(Relation relation, Size len,
> Buffer otherBuffer, int options,
> struct BulkInsertStateData * bistate)
>
> Whether BulkInsertStateData is flagged as a typedef or not, surely it
> ought to understand that "struct BulkInsertStateData" is a type name.
Uh, I think we have this listed as a known bug at the top of the
pgindent script:
# Known bugs:
#
# Blank line is added after parentheses; seen as a function definition, no space
# after *:
# y = (int) x *y;
#
# Structure/union pointers in function prototypes and definitions have an extra
# space after the asterisk:
#
# void x(struct xxc * a);
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ It's impossible for everything to be true. +
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: bruce@momjian.us, tgl@sss.pgh.pa.us, andrew@dunslane.net, robertmhaas@gmail.com
Subject: Re: pgindent weirdness
In-Reply-To: <201104201550.p3KFoxA17469@momjian.us>
References: <27646.1303314228@sss.pgh.pa.us> <201104201550.p3KFoxA17469@momjian.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