Disable EXPLAIN EXECUTE under citus

pull/897/head
Brian Cloutier 2016-10-20 17:20:30 +03:00
parent 2dcca0939b
commit 97fa4d98ba
1 changed files with 17 additions and 0 deletions

View File

@ -181,6 +181,23 @@ multi_ProcessUtility(Node *parsetree,
return; return;
} }
if (IsA(parsetree, ExplainStmt))
{
ExplainStmt *explainStmt = (ExplainStmt *) parsetree;
if (IsA(explainStmt->query, Query))
{
Query *query = (Query *) explainStmt->query;
if (query->commandType == CMD_UTILITY &&
IsA(query->utilityStmt, ExecuteStmt))
{
/* Due to a postgres limitation these cause crashes. Skip them for now */
ereport(ERROR, (errmsg("Citus does not support EXPLAIN EXECUTE")));
}
}
}
if (IsA(parsetree, CopyStmt)) if (IsA(parsetree, CopyStmt))
{ {
parsetree = ProcessCopyStmt((CopyStmt *) parsetree, completionTag, parsetree = ProcessCopyStmt((CopyStmt *) parsetree, completionTag,