Re: Preliminary results for proposed new pgindent implementation
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Stephen Frost <sfrost@snowman.net>, Robert Haas <robertmhaas@gmail.com>,
"pgsql-hackers@postgresql.org" <pgsql-hackers@postgresql.org>,
Piotr Stefaniak <postgres@piotr-stefaniak.me>
Date: 2017-05-19T16:10:17Z
Lists: pgsql-hackers
On 05/19/2017 06:48 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnaka@iki.fi> writes:
>> You can get a pretty good typedefs list just by looking for the pattern
>> "} <type name>;".
>
> That's going to catch a lot of things that are just variables, though.
> It might be all right as long as there was manual filtering after it.
At a quick glance, there are only a couple of them. This two cases
caught my eye. In twophase.c:
static struct xllist
{
StateFileChunk *head; /* first data block in the chain */
StateFileChunk *tail; /* last block in chain */
uint32 num_chunks;
uint32 bytes_free; /* free bytes left in
tail block */
uint32 total_len; /* total data bytes in
chain */
} records;
And this in informix.c:
static struct
{
long val;
int maxdigits;
int digits;
int remaining;
char sign;
char *val_string;
} value;
IMHO it would actually be an improvement if there was a space rather
than a tab there. But I'm not sure what else it would mess up to
consider those typedef names. And those are awfully generic names;
wouldn't hurt to rename them, anyway.
- Heikki
Commits
-
Manually un-break a few URLs that pgindent used to insist on splitting.
- 780b3a4c43fd 10.0 landed
-
Remove entab and associated detritus.
- 81f056c7256f 10.0 landed
-
Phase 3 of pgindent updates.
- 382ceffdf7f6 10.0 landed
-
Phase 2 of pgindent updates.
- c7b8998ebbf3 10.0 landed
-
Initial pgindent run with pg_bsd_indent version 2.0.
- e3860ffa4dd0 10.0 landed
-
Adjust pgindent script to use pg_bsd_indent 2.0.
- 8ff6d4ec7840 10.0 landed
-
Final pgindent run with old pg_bsd_indent (version 1.3).
- 9ef2dbefc7fb 10.0 landed