Convert domain_in to report errors softly.
authorTom Lane <tgl@sss.pgh.pa.us>
Sun, 11 Dec 2022 17:56:54 +0000 (12:56 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sun, 11 Dec 2022 17:56:54 +0000 (12:56 -0500)
commitb8c0ffbd2c8038fbebe76b48616860a7efec66ae
tree35bf850a377d63902da6a95747374e5b46e36419
parentc60c9badba9b4db3155eef081ae0b923f983168c
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
doc/src/sgml/ref/create_domain.sgml
src/backend/utils/adt/domains.c
src/test/regress/expected/domain.out
src/test/regress/sql/domain.sql