pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Simplify our Assert infrastructure a little.
Date: Mon, 10 Oct 2022 19:17:08 +0000
Message-ID: <E1ohyGy-001mun-1U@gemulon.postgresql.org> (raw)

Simplify our Assert infrastructure a little.

Remove the Trap and TrapMacro macros, which were nearly unused
and confusingly had the opposite condition polarity from the
otherwise-functionally-equivalent Assert macros.

Having done that, it's very hard to justify carrying the errorType
argument of ExceptionalCondition, so drop that too, and just
let it assume everything's an Assert.  This saves about 64K
of code space as of current HEAD.

Discussion: https://postgr.es/m/3928703.1665345117@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/235eb4db9879397acb57a5dfd25c18291052068a

Modified Files
--------------
contrib/amcheck/verify_heapam.c  |  2 +-
src/backend/utils/error/assert.c |  9 +++----
src/backend/utils/error/elog.c   |  3 +--
src/include/c.h                  | 57 +++++++++++-----------------------------
src/include/postgres.h           |  2 +-
5 files changed, 22 insertions(+), 51 deletions(-)



Message-ID: <E1ohyGy-001mun-1U@gemulon.postgresql.org>
Permalink:  ../E1ohyGy-001mun-1U@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1ohyGy-001mun-1U@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us
  Subject: Re: pgsql: Simplify our Assert infrastructure a little.
  In-Reply-To: <E1ohyGy-001mun-1U@gemulon.postgresql.org>
  References: <E1ohyGy-001mun-1U@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