Replace run-time error check with assertion

Peter Eisentraut <peter@eisentraut.org>

Commit: 388e75ad33489b77cfb9a8590a91e9287d8fb960
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2021-05-27T07:54:14Z
Releases: 14.0
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

Files

PathChange+/−
src/backend/commands/statscmds.c modified +5 −16

Discussion