Executor is not prepared to handle that and its not necessary since EXECUTE
DIRECT implies direct execution on the target node anyways
* A Coordinator receiving a query from another Coordinator
* is not allowed to go into PGXC planner.
*/
- if (IS_PGXC_COORDINATOR && !IsConnFromCoord())
+ if (IS_PGXC_LOCAL_COORDINATOR)
result = pgxc_planner(parse, cursorOptions, boundParams);
else
#endif
if (query->utilityStmt &&
IsA(query->utilityStmt, DeclareCursorStmt))
return NULL;
+
+ /* Do not FQS EXEC DIRECT statements */
+ if (query->utilityStmt && IsA(query->utilityStmt, RemoteQuery))
+ {
+ RemoteQuery *stmt = (RemoteQuery *) query->utilityStmt;
+ if (stmt->exec_direct_type != EXEC_DIRECT_NONE)
+ return NULL;
+ }
+
/*
* If the query can not be or need not be shipped to the Datanodes, don't
* create any plan here. standard_planner() will take care of it.