Re: The PostgreSQL C Dialect

From: Corey Huinker <corey(dot)huinker(at)gmail(dot)com>
To: jian he <jian(dot)universality(at)gmail(dot)com>
Cc: Christophe Pettus <xof(at)thebuild(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: The PostgreSQL C Dialect
Date: 2026-07-20 15:57:51
Message-ID: CADkLM=eKrET0=QTVP0xkBDSgPtoiKD=V=LzwQsQhHkJpuMsVnA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Philip Alger 2026-07-20 16:00:52 Re: [PATCH] Add pg_get_trigger_ddl() to retrieve the CREATE TRIGGER statement
Previous Message Greg Burd 2026-07-20 15:36:11 Re: [PATCH] Batched clock sweep to reduce cross-socket atomic contention