From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Make <assert.h> consistently available in frontend and backend
Date: Thu, 11 Dec 2025 09:02:26 +0000
Message-ID: <E1vTcZ7-0007yN-1g@gemulon.postgresql.org> (raw)
Make <assert.h> consistently available in frontend and backend
Previously, c.h made <assert.h> only available in frontends (#ifdef
FRONTEND), which was probably reasonable, because the only thing it
would give you is assert(), which you generally shouldn't use in the
backend. But with C11, <assert.h> also makes available
static_assert(), which would be useful everywhere. So this patch
moves <assert.h> to the commonly available header files in c.h and
fixes a small complication in regcustom.h that resulted from that.
Co-authored-by: Thomas Munro <thomas.munro@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/CA%2BhUKGKvr0x_oGmQTUkx%3DODgSksT2EtgCA6LmGx_jQFG%3DsDUpg...
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/795e94c70cf13f60b2cb4010f29a1bca542d2031
Modified Files
--------------
src/include/c.h | 2 +-
src/include/regex/regcustom.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org, pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Make <assert.h> consistently available in frontend and backend
In-Reply-To: <E1vTcZ7-0007yN-1g@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox