pgsql: Replace run-time error check with assertion

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Replace run-time error check with assertion
Date: 2021-05-27 07:59:49
Message-ID: E1lmAvl-0000Mo-8L@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: 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(at)sss(dot)pgh(dot)pa(dot)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(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2021-05-27 11:12:30 pgsql: Fix MSVC scripts when building with GSSAPI/Kerberos
Previous Message Michael Paquier 2021-05-27 05:58:43 pgsql: doc: Fix description of some GUCs in docs and postgresql.conf.sa