From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add test scaffolding for soft error reporting from input functio |
Date: | 2022-12-09 15:15:04 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
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/[email protected]
Branch
------
master
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(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2022-12-09 15:43:51 | pgsql: Const-ify a couple of datetime parsing subroutines. |
Previous Message | Alexander Korotkov | 2022-12-09 10:55:56 | pgsql: Fix invalid role names introduced in 096dd80f3c |