Re: support fast default for domain with constraints
jian he <jian.universality@gmail.com>
From: jian he <jian.universality@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-03-11T03:43:58Z
Lists: pgsql-hackers
Attachments
- v10-0002-Enable-fast-default-for-domains-with-non-volatile-constraints.patch (text/x-patch) patch v10-0002
- v10-0001-Add-DomainHasVolatileConstraints-to-check-constraint-volatility.patch (text/x-patch) patch v10-0001
On Wed, Mar 11, 2026 at 1:18 AM Andrew Dunstan <andrew@dunslane.net> wrote: > > here's an updated patch set. > +/* + * ExecPrepareExprWithContext: same as ExecPrepareExpr, but with an optional + * ErrorSaveContext for soft error handling during domain constraint evaluation. + * + * See ExecInitExprWithContext for details on the escontext parameter. + */ +ExprState * +ExecPrepareExprWithContext(Expr *node, EState *estate, Node *escontext) Since ExecPrepareExprWithContext can be used more broadly, we should delete the mention of domain constraint from the above comments. I checked alter_table.sgml again, no need to change it, I think. Slightly changed the regression test comments. -- jian https://www.enterprisedb.com/
Commits
-
Enable fast default for domains with non-volatile constraints
- a0b6ef29a518 19 (unreleased) landed
-
Extend DomainHasConstraints() to optionally check constraint volatility
- 487cf2cbd2f5 19 (unreleased) landed
-
Restrict virtual columns to use built-in functions and types
- 0cd69b3d7ef3 18.0 cited
-
Replace EEOP_DONE with special steps for return/no return
- 8dd7c7cd0a26 18.0 cited
-
Add soft error handling to some expression nodes
- aaaf9449ec6b 17.0 cited