From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | pgindent fixups |
Date: | 2016-05-03 02:56:38 |
Message-ID: | CA+TgmoZfmMDAuCKnR_d-U_0T=4rcqU4=NVacKcKTW7YEinyrRg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
I spent some time going through the output of a trial pgindent run
today. Some questions/problems:
1. Is pgindent supposed to touch DATA() lines? Because it does.
2. CustomPathMethods is not in the buildfarm's typedefs.list. Why not?
I'm attaching a patch that fixes up a few other problems that I found,
which I'll commit if there are not objections. In detail:
- In contrib/pageinspect/heapfuncs.c, it separates the declaration of
bits_len from the initialization to avoid an awkward line-wrap.
- In src/backend/executor/execParallel.c, it dodges two cases where
pgindent does stupid things with offsetof. Apparently, pgindent
thinks that you should write "offsetof(a, b) +c" rather than
"offsetof(a, b) + c". In one case, I talked it out of it by putting
the + at the end of the first line rather than the start of the
continuation line. The other statement was all on one line so I
changed it to say "c + offsetof(a, b)" instead.
- In nodeAgg.c, to_ts_any.c, and tsvector_op.c, I moved end-of-line
comments to their own separate lines, because they were getting broken
up into multiple lines in ways that seemed awkward. In tsginidx.c, I
left a similar comment inline but fiddled the whitespace and comment
text to avoid getting a line break in mid-comment.
- In spell.c, I added -------- markers around a comment to prevent
pgindent from messing with the whitespace (entab still adjusts it, but
that should look the same if you have your tab stops set right).
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
Attachment | Content-Type | Size |
---|---|---|
pgindent-cleanup.patch | application/x-download | 6.0 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2016-05-03 02:58:07 | Re: [COMMITTERS] pgsql: Fix assorted inconsistencies in GIN opclass support function dec |
Previous Message | dandl | 2016-05-03 02:46:55 | Re: About subxact and xact nesting level... |