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.
*/
RangeTblEntry *subqueryRte = ExtractSelectRangeTableEntry(planContext.originalQuery);
subqueryRte = linitial(subqueryRte->subquery->rtable);
RangeTblEntry *valuesRte = linitial(subqueryRte->subquery->rtable);
elog(INFO, "valuesRte: %d len: %d",valuesRte->rtekind, list_length(valuesRte->values_lists));
// RangeTblEntry *subqueryRte = ExtractSelectRangeTableEntry(planContext.originalQuery);
// subqueryRte = linitial(subqueryRte->subquery->rtable);
// RangeTblEntry *valuesRte = linitial(subqueryRte->subquery->rtable);
// elog(INFO, "valuesRte: %d len: %d",valuesRte->rtekind, list_length(valuesRte->values_lists));
planContext.plan = standard_planner(planContext.query,

View File

@ -322,7 +322,9 @@ DistributedInsertSelectSupported(Query *queryTree, RangeTblEntry *insertRte,
char targetPartitionMethod = PartitionMethod(targetRelationId);
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 */
AssertArg(InsertSelectIntoCitusTable(queryTree));