Re: WIP: Faster Expression Processing v4

From: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: WIP: Faster Expression Processing v4
Date: 2017-03-14 11:28:02
Message-ID: 20170314112802.bnnuneyxtpwapzr5@alvherre.pgsql
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andres Freund wrote:

> EEO_SWITCH(op->opcode)
> {
> EEO_CASE(EEO_DONE):
> goto out;

Oh my.

> which is a bit annoying. (the EEO_CASE is either a jump label or a case
> statement, depending on computed goto availability).
>
> It seems we could either:
> 1) live with the damage
> 2) disable pgindent
> 3) move the : inside EEO_CASE's definition, and only use {} blocks.

I think 3) is nasty because the result doesn't look like normal C. If
EEO_CASE() are potentially jump labels, then indentation becomes
correct. Why not accept it? It looks odd, but that gives a better hint
to the reader about what's going on.

--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2017-03-14 11:37:01 Re: [COMMITTERS] pgsql: Improve postmaster's logging of listen socket creation.
Previous Message Robert Haas 2017-03-14 11:27:39 Re: [PATCH] Use $ parameters as replacement characters for pg_stat_statements