Re: support fast default for domain with constraints

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: support fast default for domain with constraints
Date: 2026-03-11 03:43:58
Message-ID: CACJufxE=VV5xvRLUhVP2Oej3SpZs1+Ksr=QUACm4ZUhE9TjSng@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Mar 11, 2026 at 1:18 AM Andrew Dunstan <andrew(at)dunslane(dot)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/

Attachment Content-Type Size
v10-0002-Enable-fast-default-for-domains-with-non-volatile-constraints.patch text/x-patch 15.4 KB
v10-0001-Add-DomainHasVolatileConstraints-to-check-constraint-volatility.patch text/x-patch 3.1 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message wenhui qiu 2026-03-11 03:56:04 Re: another autovacuum scheduling thread
Previous Message cca5507 2026-03-11 03:25:22 Save a few bytes per CatCTup