diff options
author | Robert Haas <rhaas@postgresql.org> | 2017-08-03 11:21:29 -0400 |
---|---|---|
committer | Robert Haas <rhaas@postgresql.org> | 2017-08-03 11:21:29 -0400 |
commit | 610e8ebb0fadd7a738c2ad07fef6c5ea86b11f8d (patch) | |
tree | 703e9cd198a275278767d7e1756907305e580429 /src/include | |
parent | 5ff3d73813ebcc3ff80be77c30b458d728951036 (diff) |
Teach map_partition_varattnos to handle whole-row expressions.
Otherwise, partitioned tables with RETURNING expressions or subject
to a WITH CHECK OPTION do not work properly.
Amit Langote, reviewed by Amit Khandekar and Etsuro Fujita. A few
comment changes by me.
Discussion: http://postgr.es/m/9a39df80-871e-6212-0684-f93c83be4097@lab.ntt.co.jp
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/partition.h | 3 | ||||
-rw-r--r-- | src/include/rewrite/rewriteManip.h | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/include/catalog/partition.h b/src/include/catalog/partition.h index f10879a162a..434ded37d74 100644 --- a/src/include/catalog/partition.h +++ b/src/include/catalog/partition.h @@ -80,7 +80,8 @@ extern Oid get_partition_parent(Oid relid); extern List *get_qual_from_partbound(Relation rel, Relation parent, PartitionBoundSpec *spec); extern List *map_partition_varattnos(List *expr, int target_varno, - Relation partrel, Relation parent); + Relation partrel, Relation parent, + bool *found_whole_row); extern List *RelationGetPartitionQual(Relation rel); extern Expr *get_partition_qual_relid(Oid relid); diff --git a/src/include/rewrite/rewriteManip.h b/src/include/rewrite/rewriteManip.h index 282ff9967ff..f0a7a8b2cd0 100644 --- a/src/include/rewrite/rewriteManip.h +++ b/src/include/rewrite/rewriteManip.h @@ -72,7 +72,7 @@ extern Node *replace_rte_variables_mutator(Node *node, extern Node *map_variable_attnos(Node *node, int target_varno, int sublevels_up, const AttrNumber *attno_map, int map_length, - bool *found_whole_row); + Oid to_rowtype, bool *found_whole_row); extern Node *ReplaceVarsFromTargetList(Node *node, int target_varno, int sublevels_up, |