From 235eb4db9879397acb57a5dfd25c18291052068a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Mon, 10 Oct 2022 15:16:56 -0400 Subject: 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 --- src/include/postgres.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/include/postgres.h') diff --git a/src/include/postgres.h b/src/include/postgres.h index 5f6a1e3d5a2..54730dfb381 100644 --- a/src/include/postgres.h +++ b/src/include/postgres.h @@ -135,7 +135,7 @@ typedef enum vartag_external ((tag) == VARTAG_INDIRECT ? sizeof(varatt_indirect) : \ VARTAG_IS_EXPANDED(tag) ? sizeof(varatt_expanded) : \ (tag) == VARTAG_ONDISK ? sizeof(varatt_external) : \ - TrapMacro(true, "unrecognized TOAST vartag")) + (AssertMacro(false), 0)) /* * These structs describe the header of a varlena object that may have been -- cgit v1.2.3