add command execution -3

replace_m_row_insert_select
Onder Kalaci 2020-05-08 16:03:09 +02:00
parent b8e42ab608
commit 163de79971
2 changed files with 7 additions and 5 deletions

View File

@ -269,10 +269,10 @@ distributed_planner(Query *parse, int cursorOptions, ParamListInfo boundParams)
* postgres' planner. * postgres' planner.
*/ */
RangeTblEntry *subqueryRte = ExtractSelectRangeTableEntry(planContext.originalQuery); // RangeTblEntry *subqueryRte = ExtractSelectRangeTableEntry(planContext.originalQuery);
subqueryRte = linitial(subqueryRte->subquery->rtable); // subqueryRte = linitial(subqueryRte->subquery->rtable);
RangeTblEntry *valuesRte = linitial(subqueryRte->subquery->rtable); // RangeTblEntry *valuesRte = linitial(subqueryRte->subquery->rtable);
elog(INFO, "valuesRte: %d len: %d",valuesRte->rtekind, list_length(valuesRte->values_lists)); // elog(INFO, "valuesRte: %d len: %d",valuesRte->rtekind, list_length(valuesRte->values_lists));
planContext.plan = standard_planner(planContext.query, planContext.plan = standard_planner(planContext.query,

View File

@ -322,7 +322,9 @@ DistributedInsertSelectSupported(Query *queryTree, RangeTblEntry *insertRte,
char targetPartitionMethod = PartitionMethod(targetRelationId); char targetPartitionMethod = PartitionMethod(targetRelationId);
ListCell *rangeTableCell = NULL; ListCell *rangeTableCell = NULL;
return false; return DeferredError(ERRCODE_FEATURE_NOT_SUPPORTED,
"cannot insert into view over distributed table",
NULL, NULL);
/* we only do this check for INSERT ... SELECT queries */ /* we only do this check for INSERT ... SELECT queries */
AssertArg(InsertSelectIntoCitusTable(queryTree)); AssertArg(InsertSelectIntoCitusTable(queryTree));