Re: [PATCH] binary heap implementation

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Abhijit Menon-Sen <ams@2ndquadrant.com>, pgsql-hackers@postgresql.org
Date: 2012-11-15T16:08:09Z
Lists: pgsql-hackers
On 11/15/2012 10:11 AM, Robert Haas wrote:

> +	{
> +		sift_down(heap, i);
> +	}
>
> Project style is to omit braces for a single-line body.  This comes up
> a few other places as well.
>

I thought we modified that some years ago, although my memory of it is a 
bit hazy. Personally I think it's a bad rule, at least as stated, in the 
case where there's an else clause with a compound statement. I'd prefer 
to see a rule that says that either both branches of an if/else should 
be compound statements or neither should be. I think the cases where 
only one branch is a compound statement are rather ugly.

cheers

andrew



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Fix memory leaks in record_out() and record_send().