Re: pgindent behavior we could do without

From: Noah Misch <noah(at)leadboat(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: pgindent behavior we could do without
Date: 2013-07-19 03:22:35
Message-ID: 20130719032235.GA102571@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 18, 2013 at 12:27:21AM -0400, Tom Lane wrote:
> It's always annoyed me that pgindent insists on adjusting vertical
> whitespace around #else and related commands. This has, for example,
> rendered src/include/storage/barrier.h nigh illegible: you get things
> like
>
> /*
> * lwsync orders loads with respect to each other, and similarly with stores.
> * But a load can be performed before a subsequent store, so sync must be used
> * for a full memory barrier.
> */
> #define pg_memory_barrier() __asm__ __volatile__ ("sync" : : : "memory")
> #define pg_read_barrier() __asm__ __volatile__ ("lwsync" : : : "memory")
> #define pg_write_barrier() __asm__ __volatile__ ("lwsync" : : : "memory")
> #elif defined(__alpha) || defined(__alpha__) /* Alpha */
>
> which makes it look like this block of code has something to do with
> Alpha.

Agreed. I've similarly disliked how pgindent adds a blank line between an #if
and a multi-line comment, like at the top of get_restricted_token().

--
Noah Misch
EnterpriseDB http://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2013-07-19 03:30:11 Re: pgindent behavior we could do without
Previous Message Greg Smith 2013-07-19 03:09:13 Re: [v9.4] row level security