| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: test_extensible: Improve handling of incorrect inputs |
| Date: | 2026-09-10 02:04:08 |
| Message-ID: | E1x4U91-00000004DG6-1Kt6@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
test_extensible: Improve handling of incorrect inputs
The SQL wrappers of the module relied on stringToNode(), that trusts
its input. When specifying node strings that to not match with the
expected ExtensibleNode "TestExtNode", the module would crash.
This adds a simple set of sanity checks to check the input, ensuring
that only an ExtensibleNode "TestExtNode" goes through. Though far
from critical, it's always nice to make these test modules not crash
when used.
Oversight in 0e944fe3579.
Author: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
Reviewed-by: Greg Burd <greg(at)burd(dot)me>
Discussion: https://postgr.es/m/CAN4CZFOTQXMZvuPxweO4Fm7+sjrPJUqU-JvYKETLBxuhqgbPjw@mail.gmail.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7ac0c2d058adb0aa47b7deb444c1949b84b7d781
Modified Files
--------------
.../test_extensible/expected/test_extensible.out | 7 ++++
.../test_extensible/sql/test_extensible.sql | 4 ++
src/test/modules/test_extensible/test_extensible.c | 45 ++++++++++++++++------
3 files changed, 44 insertions(+), 12 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Michael Paquier | 2026-09-10 02:29:39 | pgsql: test_bitmapset: Improve handling of incorrect inputs |
| Previous Message | Richard Guo | 2026-09-10 01:04:21 | pgsql: Fix duplicate enforcement of EC-derived conditions |