pgsql: Replace run-time error check with assertion - Mailing list pgsql-committers

From Peter Eisentraut
Subject pgsql: Replace run-time error check with assertion
Date
Msg-id E1lmAvl-0000Mo-8L@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Replace run-time error check with assertion

The error message was checking that the structures returned from the
parser matched expectations.  That's something we usually use
assertions for, not a full user-facing error message.  So replace that
with an assertion (hidden inside lfirst_node()).

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/452e9df8-ec89-e01b-b64a-8cc6ce830458%40enterprisedb.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/388e75ad33489b77cfb9a8590a91e9287d8fb960

Modified Files
--------------
src/backend/commands/statscmds.c | 21 +++++----------------
1 file changed, 5 insertions(+), 16 deletions(-)


pgsql-committers by date:

Previous
From: Michael Paquier
Date:
Subject: pgsql: doc: Fix description of some GUCs in docs and postgresql.conf.sa
Next
From: Michael Paquier
Date:
Subject: pgsql: Fix MSVC scripts when building with GSSAPI/Kerberos