We do some special processing for RemoteSubplan with returning lists. But the
EXPLAIN plan mechanism is not adequetly trained to handle that special
crafting. So for now do not try to print the target list in the EXPLAIN output.
return;
if (IsA(plan, RecursiveUnion))
return;
+ /* Ditto for RemoteSubplan on top of ModifyTable */
+ if (IsA(plan, RemoteSubplan) && plan->lefttree &&
+ IsA(plan->lefttree, ModifyTable) &&
+ (((ModifyTable *) plan->lefttree)->returningLists != NIL))
+ return;
/*
* Likewise for ForeignScan that executes a direct INSERT/UPDATE/DELETE
QUERY PLAN
-------------------------------------------------------------------
Remote Subquery Scan on any
- Output: base_tbl.a, base_tbl.b
-> Update on public.base_tbl
Output: base_tbl.a, base_tbl.b
-> Seq Scan on public.base_tbl
Output: base_tbl.a, (base_tbl.b + 1), base_tbl.ctid
-(6 rows)
+(5 rows)
UPDATE rw_view1 SET b = b + 1 RETURNING *;
a | b