test_bitmapset: Improve handling of incorrect inputs
The SQL wrappers of the module relied on stringToNode(), that entirely
trusts its input. This commit applies an extra round of validation, to
prevent the test module from crashing on incorrect inputs, provided
through the SQL functions.
No backpatch, as this is no critical issue.
Author: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Greg Burd <greg@burd.me>
Discussion: https://postgr.es/m/CAN4CZFOTQXMZvuPxweO4Fm7+sjrPJUqU-JvYKETLBxuhqgbPjw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/34c11958b6f12a90c0ec9fca3ce502a32280c30d
Modified Files
--------------
.../test_bitmapset/expected/test_bitmapset.out | 24 ++++++++++++
.../modules/test_bitmapset/sql/test_bitmapset.sql | 10 +++++
src/test/modules/test_bitmapset/test_bitmapset.c | 44 ++++++++++++++++++++--
3 files changed, 75 insertions(+), 3 deletions(-)