From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add test scaffolding for soft error reporting from input functio
Date: Fri, 09 Dec 2022 15:15:04 +0000
Message-ID: <E1p3f5c-002gaU-0h@gemulon.postgresql.org> (raw)
Add test scaffolding for soft error reporting from input functions.
pg_input_is_valid() returns boolean, while pg_input_error_message()
returns the primary error message if the input is bad, or NULL
if the input is OK. The main reason for having two functions is
so that we can test both the details-wanted and the no-details-wanted
code paths.
Although these are primarily designed with testing in mind,
it could well be that they'll be useful to end users as well.
This patch is mostly by me, but it owes very substantial debt to
earlier work by Nikita Glukhov, Andrew Dunstan, and Amul Sul.
Thanks to Andres Freund for review.
Discussion: https://postgr.es/m/3bbbb0df-7382-bf87-9737-340ba096e034@postgrespro.ru
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/1939d26282b27b4b264c6930830a7991ed83917a
Modified Files
--------------
doc/src/sgml/func.sgml | 101 +++++++++++++++++++++++
src/backend/utils/adt/misc.c | 129 ++++++++++++++++++++++++++++++
src/include/catalog/catversion.h | 2 +-
src/include/catalog/pg_proc.dat | 8 ++
src/test/regress/expected/create_type.out | 25 ++++++
src/test/regress/regress.c | 5 ++
src/test/regress/sql/create_type.sql | 8 ++
7 files changed, 277 insertions(+), 1 deletion(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: tgl@sss.pgh.pa.us
Subject: Re: pgsql: Add test scaffolding for soft error reporting from input functio
In-Reply-To: <E1p3f5c-002gaU-0h@gemulon.postgresql.org>
References: <E1p3f5c-002gaU-0h@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox