From: Tom Lane <tgl@sss.pgh.pa.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Convert domain_in to report errors softly.
Date: Sun, 11 Dec 2022 18:02:45 +0000
Message-ID: <E1p4Qey-0033g7-3c@gemulon.postgresql.org> (raw)
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(-)
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: Convert domain_in to report errors softly.
In-Reply-To: <E1p4Qey-0033g7-3c@gemulon.postgresql.org>
References: <E1p4Qey-0033g7-3c@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