Re: pgindent vs dtrace on macos
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2020-09-22T08:25:54Z
Lists: pgsql-hackers
> On 21 Sep 2020, at 20:55, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Oh wait, I forgot about the fmgrprotos.h discrepancy. > > I wrote: >> It strikes me that a low-cost workaround would be to rename these >> C functions. There's no law that their C names must match the >> SQL names. > > Here's a proposed patch to fix it that way. +1 on this patch. Do you think it's worth adding a note about this in the documentation to save the next one staring at this a few minutes? Something along the lines of: --- a/src/tools/pgindent/README +++ b/src/tools/pgindent/README @@ -110,6 +110,9 @@ Sometimes, if pgindent or perltidy produces odd-looking output, it's because of minor bugs like extra commas. Don't hesitate to clean that up while you're at it. +If an exported function shares a name with a typedef, the header file with the +prototype can get incorrect spacing for the function. + cheers ./daniel
Commits
-
Exclude fmgrprotos.h from pgindent processing.
- c4133ec169df 14.0 landed
-
Fix a few more generator scripts to produce pgindent-clean output.
- f859c2ffa01d 14.0 landed
-
Further improve pgindent's list of file exclusions.
- 74d4608f506b 14.0 landed
-
Improve formatting of create_help.pl and plperl_opmask.pl output.
- add105840b67 14.0 landed