This is an automated email from the ASF dual-hosted git repository.
chenjinbao1989 pushed a commit to branch cbdb-postgres-merge
in repository https://gitbox.apache.org/repos/asf/cloudberry.git
The following commit(s) were added to refs/heads/cbdb-postgres-merge by this
push:
new aa194c18bde The generated column can be exist in split update
aa194c18bde is described below
commit aa194c18bdeced53b142ccb93797eae827dcb309
Author: Jinbao Chen <[email protected]>
AuthorDate: Sat Nov 15 19:43:53 2025 +0800
The generated column can be exist in split update
---
src/backend/executor/nodeModifyTable.c | 2 ++
src/test/regress/expected/updatable_views.out | 33 +++++++++++++++------------
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/src/backend/executor/nodeModifyTable.c
b/src/backend/executor/nodeModifyTable.c
index 9dd6deabd11..7e159c9a824 100644
--- a/src/backend/executor/nodeModifyTable.c
+++ b/src/backend/executor/nodeModifyTable.c
@@ -268,6 +268,7 @@ ExecCheckPlanOutput(Relation resultRel, List *targetList)
* exact type though, since a null value is
type-independent. As
* above, just insist on *some* NULL constant.
*/
+#if 0
if (!IsA(tle->expr, Const) ||
!((Const *) tle->expr)->constisnull)
ereport(ERROR,
@@ -275,6 +276,7 @@ ExecCheckPlanOutput(Relation resultRel, List *targetList)
errmsg("table row type and
query-specified row type do not match"),
errdetail("Query provides a
value for a generated column at ordinal position %d.",
attno)));
+#endif
}
else
{
diff --git a/src/test/regress/expected/updatable_views.out
b/src/test/regress/expected/updatable_views.out
index 680caab7cfe..c49396d0545 100644
--- a/src/test/regress/expected/updatable_views.out
+++ b/src/test/regress/expected/updatable_views.out
@@ -2833,23 +2833,26 @@ CREATE RULE v1_upd_rule AS ON UPDATE TO v1 DO INSTEAD
CREATE VIEW v2 WITH (security_barrier = true) AS
SELECT * FROM v1 WHERE EXISTS (SELECT 1);
EXPLAIN (COSTS OFF) UPDATE v2 SET a = 1;
- QUERY PLAN
----------------------------------------------------
+ QUERY PLAN
+---------------------------------------------------------------
Update on t1
- InitPlan 1 (returns $0)
+ InitPlan 1 (returns $0) (slice2)
-> Result
- -> Merge Join
- Merge Cond: (t1.a = v1.a)
- -> Sort
- Sort Key: t1.a
- -> Seq Scan on t1
- -> Sort
- Sort Key: v1.a
- -> Subquery Scan on v1
- -> Result
- One-Time Filter: $0
- -> Seq Scan on t1 t1_1
-(14 rows)
+ -> Explicit Redistribute Motion 3:3 (slice1; segments: 3)
+ -> Split
+ -> Merge Join
+ Merge Cond: (t1.a = v1.a)
+ -> Sort
+ Sort Key: t1.a
+ -> Seq Scan on t1
+ -> Sort
+ Sort Key: v1.a
+ -> Subquery Scan on v1
+ -> Result
+ One-Time Filter: $0
+ -> Seq Scan on t1 t1_1
+ Optimizer: Postgres query optimizer
+(17 rows)
DROP VIEW v2;
DROP VIEW v1;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]