From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Daniel Gustafsson <daniel(at)yesql(dot)se> |
Cc: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgindent vs dtrace on macos |
Date: | 2020-09-16 23:55:17 |
Message-ID: | 43461.1600300517@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
> The attached patch fixes the generation of sql_help.h and perl_opmask.h to make
> sure they conform to pgindent. Those were the only file I got diffs in after a
> pgindent run apart from fmgrprotos.h which gave the below:
Hmm, I seem to recall there were more when this happened to me back in
May. But in any case, fixing these is an improvement.
> Not sure what pgindent is doing there, but it seems hard to address in the
> generator.
I think the issue is that pgindent believes "numeric" and "chr" are
typedefs. (The regex code can be blamed for "chr", but I'm not quite
sure where "numeric" is coming from.) Observe that it also messes up
the definitions of those two functions, not only their extern
declarations.
We could try adding those names to the typedef exclusion list in pgindent,
but that could easily make things worse not better overall. On balance
I'd say this particular behavior is a pgindent bug, and if anybody is hot
to remove the discrepancy then they ought to try to fix pgindent not the
fmgrprotos generator.
> probes.h is also added to the exclusion list in the patch.
Check.
> On that note, I
> wonder if we should add the plperl .xs generated files as exclusions too since
> we don't control that generator?
Not an issue I don't think; pgindent won't touch extensions other than
.c and .h.
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2020-09-17 00:01:33 | Re: DROP relation IF EXISTS Docs and Tests - Bug Fix |
Previous Message | Tom Lane | 2020-09-16 23:42:15 | Re: DROP relation IF EXISTS Docs and Tests - Bug Fix |