Re: The PostgreSQL C Dialect - Mailing list pgsql-hackers

From Corey Huinker
Subject Re: The PostgreSQL C Dialect
Date
Msg-id CADkLM=eKrET0=QTVP0xkBDSgPtoiKD=V=LzwQsQhHkJpuMsVnA@mail.gmail.com
Whole thread
In response to Re: The PostgreSQL C Dialect  (jian he <jian.universality@gmail.com>)
List pgsql-hackers
Fewer parentheses are generally more readable, IMHO.
So https://wiki.postgresql.org/wiki/The_PostgreSQL_C_Dialect

ereport(ERROR,
        (errcode(ERRCODE_DIVISION_BY_ZERO),
         errmsg("division by zero")));

can be replaced by

ereport(ERROR,
        errcode(ERRCODE_DIVISION_BY_ZERO),
         errmsg("division by zero"));

````

I just saw this, and I had already a change a while back. Per e3a87b4991cc2d00, fewer parens is the standard for new code, but existing code is not altered to avoid code churn and messy backports.

pgsql-hackers by date:

Previous
From: "Greg Burd"
Date:
Subject: Re: [PATCH] Batched clock sweep to reduce cross-socket atomic contention
Next
From: Philip Alger
Date:
Subject: Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement