Replace run-time error check with assertion
authorPeter Eisentraut <peter@eisentraut.org>
Thu, 27 May 2021 07:52:12 +0000 (09:52 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Thu, 27 May 2021 07:54:14 +0000 (09:54 +0200)
commit388e75ad33489b77cfb9a8590a91e9287d8fb960
tree1ef258f3c6d78552dc9ecedd2b3b97f2cba93f20
parent2941138e60fc711bd221b3264807f36cc079dfbb
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
src/backend/commands/statscmds.c