pgsql: Simplify our Assert infrastructure a little.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Simplify our Assert infrastructure a little.
Date: 2022-10-10 19:17:08
Message-ID: E1ohyGy-001mun-1U@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2022-10-10 20:28:51 pgsql: Stamp 15.0.
Previous Message Peter Eisentraut 2022-10-10 10:08:46 pgsql: Translation updates