pgsql: Simplify our Assert infrastructure a little.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема pgsql: Simplify our Assert infrastructure a little.
Дата
Msg-id E1ohyGy-001mun-1U@gemulon.postgresql.org
обсуждение исходный текст
Список 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(-)


В списке pgsql-committers по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: pgsql: Translation updates
Следующее
От: Tom Lane
Дата:
Сообщение: pgsql: Stamp 15.0.