pgsql: Improve Assert output - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Improve Assert output
Date
Msg-id E1hywO1-00046k-W9@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
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(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: Add default_table_access_method to postgresql.conf.sample.
Next
From: Tom Lane
Date:
Subject: pgsql: Make deadlock-parallel isolation test more robust.