Re: pgindent versus struct members and typedefs - Mailing list pgsql-hackers

From Álvaro Herrera
Subject Re: pgindent versus struct members and typedefs
Date
Msg-id 202512031723.4j5jk5sqv5rc@alvherre.pgsql
Whole thread Raw
In response to Re: pgindent versus struct members and typedefs  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
On 2025-Dec-03, Andrew Dunstan wrote:

> +1. One of the things I find particularly un-aesthetic is having some
> branches of an if statement with braces and some without. We have lots of
> cases of that, but I try to avoid it.

I actually prefer that style: when there are only two branches, and the
other branch of the if is long, I put the short one first without
braces, and then braces around the long "else" one.

-- 
Álvaro Herrera         PostgreSQL Developer  —  https://www.EnterpriseDB.com/
"The eagle never lost so much time, as
when he submitted to learn of the crow." (William Blake)



pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: [PATCH] Add enable_copy_program GUC to control COPY PROGRAM
Next
From: Peter Geoghegan
Date:
Subject: Re: Returning nbtree posting list TIDs in DESC order during backwards scans