aboutsummaryrefslogtreecommitdiff
path: root/src/include/executor/executor.h
diff options
context:
space:
mode:
authorPeter Eisentraut <peter@eisentraut.org>2025-03-28 13:53:37 +0100
committerPeter Eisentraut <peter@eisentraut.org>2025-03-28 13:53:37 +0100
commitcdc168ad4b22ea4183f966688b245cabb5935d1f (patch)
tree1755b8898eadbb54ceaee15acb612952f9bcaeb7 /src/include/executor/executor.h
parent747ddd38cbf6d32bca496e69c1efb2ae4fe333cc (diff)
downloadpostgresql-cdc168ad4b22ea4183f966688b245cabb5935d1f.tar.gz
postgresql-cdc168ad4b22ea4183f966688b245cabb5935d1f.zip
Add support for not-null constraints on virtual generated columns
This was left out of the original patch for virtual generated columns (commit 83ea6c54025). This just involves a bit of extra work in the executor to expand the generation expressions and run a "IS NOT NULL" test against them. There is also a bit of work to make sure that not-null constraints are checked during a table rewrite. Author: jian he <jian.universality@gmail.com> Reviewed-by: Xuneng Zhou <xunengzhou@gmail.com> Reviewed-by: Navneet Kumar <thanit3111@gmail.com> Reviewed-by: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/CACJufxHArQysbDkWFmvK+D1TPHQWWTxWN15cMuUaTYX3xhQXgg@mail.gmail.com
Diffstat (limited to 'src/include/executor/executor.h')
-rw-r--r--src/include/executor/executor.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/include/executor/executor.h b/src/include/executor/executor.h
index 6a1fec88928..ae99407db89 100644
--- a/src/include/executor/executor.h
+++ b/src/include/executor/executor.h
@@ -257,6 +257,10 @@ extern ResultRelInfo *ExecGetTriggerResultRel(EState *estate, Oid relid,
extern List *ExecGetAncestorResultRels(EState *estate, ResultRelInfo *resultRelInfo);
extern void ExecConstraints(ResultRelInfo *resultRelInfo,
TupleTableSlot *slot, EState *estate);
+extern AttrNumber ExecRelGenVirtualNotNull(ResultRelInfo *resultRelInfo,
+ TupleTableSlot *slot,
+ EState *estate,
+ List *notnull_virtual_attrs);
extern bool ExecPartitionCheck(ResultRelInfo *resultRelInfo,
TupleTableSlot *slot, EState *estate, bool emitError);
extern void ExecPartitionCheckEmitError(ResultRelInfo *resultRelInfo,