Re: pgindent vs dtrace on macos

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: pgindent vs dtrace on macos
Дата
Msg-id 43461.1600300517@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: pgindent vs dtrace on macos  (Daniel Gustafsson <daniel@yesql.se>)
Ответы Re: pgindent vs dtrace on macos
Re: pgindent vs dtrace on macos
Re: pgindent vs dtrace on macos
Список pgsql-hackers
Daniel Gustafsson <daniel@yesql.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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: DROP relation IF EXISTS Docs and Tests - Bug Fix
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: DROP relation IF EXISTS Docs and Tests - Bug Fix