Обсуждение: pgsql: Improve Assert output

Поиск
Список
Период
Сортировка

pgsql: Improve Assert output

От
Peter Eisentraut
Дата:
Improve Assert output

If an assertion expression contained a macro, the failed assertion
message would print the expanded macro, which is usually unhelpful and
confusing.  Restructure the Assert macros to not expand any macros
when constructing the failure message.

This also fixes that the existing output for Assert et al. shows
the *inverted* condition, which is also confusing and not how
assertions usually work.

Discussion: https://www.postgresql.org/message-id/flat/6c68efe3-117a-dcc1-73d4-18ba1ec532e2%402ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d78d452bc5ac46a970e4fca2b31f3d533815c39a

Modified Files
--------------
src/include/c.h | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)