mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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
This commit is contained in:
@ -239,6 +239,11 @@ INSERT INTO tab (domcol) VALUES ((SELECT domcol FROM tab WHERE false));
|
||||
DOMAIN</command>), adjust the function definition, and re-add the
|
||||
constraint, thereby rechecking it against stored data.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
It's also good practice to ensure that domain <literal>CHECK</literal>
|
||||
expressions will not throw errors.
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
|
Reference in New Issue
Block a user