pgsql: Convert domain_in to report errors softly. - Mailing list pgsql-committers

From Tom Lane
Subject pgsql: Convert domain_in to report errors softly.
Date
Msg-id E1p4Qey-0033g7-3c@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Convert domain_in to report errors softly.

This is straightforward as far as it goes.  However, it does not
attempt to trap errors occurring during the execution of domain
CHECK constraints.  Since those are general user-defined
expressions, the only way to do that would involve starting up a
subtransaction for each check.  Of course the entire point of
the soft-errors feature is to not need subtransactions, so that
would be self-defeating.  For now, we'll rely on the assumption
that domain checks are written to avoid throwing errors.

Discussion: https://postgr.es/m/1181028.1670635727@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b8c0ffbd2c8038fbebe76b48616860a7efec66ae

Modified Files
--------------
doc/src/sgml/ref/create_domain.sgml  |  5 ++++
src/backend/utils/adt/domains.c      | 36 ++++++++++++++++++--------
src/test/regress/expected/domain.out | 50 ++++++++++++++++++++++++++++++++++++
src/test/regress/sql/domain.sql      | 19 ++++++++++++++
4 files changed, 100 insertions(+), 10 deletions(-)


pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: pgsql: Convert json_in and jsonb_in to report errors softly.
Next
From: Michael Paquier
Date:
Subject: pgsql: Remove direct call to GetNewObjectId() for pg_auth_members.oid