aboutsummaryrefslogtreecommitdiff
path: root/src/backend/parser/parse_utilcmd.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2017-08-03 11:21:29 -0400
committerRobert Haas <rhaas@postgresql.org>2017-08-03 11:21:29 -0400
commit610e8ebb0fadd7a738c2ad07fef6c5ea86b11f8d (patch)
tree703e9cd198a275278767d7e1756907305e580429 /src/backend/parser/parse_utilcmd.c
parent5ff3d73813ebcc3ff80be77c30b458d728951036 (diff)
downloadpostgresql-610e8ebb0fadd7a738c2ad07fef6c5ea86b11f8d.tar.gz
postgresql-610e8ebb0fadd7a738c2ad07fef6c5ea86b11f8d.zip
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/backend/parser/parse_utilcmd.c')
-rw-r--r--src/backend/parser/parse_utilcmd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/parser/parse_utilcmd.c b/src/backend/parser/parse_utilcmd.c
index 9f37f1b9206..a86c2341f50 100644
--- a/src/backend/parser/parse_utilcmd.c
+++ b/src/backend/parser/parse_utilcmd.c
@@ -1107,7 +1107,7 @@ transformTableLikeClause(CreateStmtContext *cxt, TableLikeClause *table_like_cla
ccbin_node = map_variable_attnos(stringToNode(ccbin),
1, 0,
attmap, tupleDesc->natts,
- &found_whole_row);
+ InvalidOid, &found_whole_row);
/*
* We reject whole-row variables because the whole point of LIKE
@@ -1463,7 +1463,7 @@ generateClonedIndexStmt(CreateStmtContext *cxt, Relation source_idx,
indexkey = map_variable_attnos(indexkey,
1, 0,
attmap, attmap_length,
- &found_whole_row);
+ InvalidOid, &found_whole_row);
/* As in transformTableLikeClause, reject whole-row variables */
if (found_whole_row)
@@ -1539,7 +1539,7 @@ generateClonedIndexStmt(CreateStmtContext *cxt, Relation source_idx,
pred_tree = map_variable_attnos(pred_tree,
1, 0,
attmap, attmap_length,
- &found_whole_row);
+ InvalidOid, &found_whole_row);
/* As in transformTableLikeClause, reject whole-row variables */
if (found_whole_row)