Thread: pgsql: Simplify our Assert infrastructure a little.
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(-)