Re: Preliminary results for proposed new pgindent implementation

From: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, Piotr Stefaniak <postgres(at)piotr-stefaniak(dot)me>
Subject: Re: Preliminary results for proposed new pgindent implementation
Date: 2017-05-19 16:10:17
Message-ID: aae20e71-5b34-cd3d-4661-5a7216589aab@iki.fi
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 05/19/2017 06:48 PM, Tom Lane wrote:
> Heikki Linnakangas <hlinnaka(at)iki(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2017-05-19 16:10:55 Re: [ANNOUNCE] PostgreSQL 10 Beta 1 Released!
Previous Message Bruce Momjian 2017-05-19 16:01:33 Re: Preliminary results for proposed new pgindent implementation