From c758920890309e50f47a9427039cf735ddf04d37 Mon Sep 17 00:00:00 2001 From: RAJASEKAR G Date: Thu, 6 Apr 2017 09:46:42 +0100 Subject: [PATCH] Properly handle EXPLAIN queries entered directly by the user in the query tool. Fixes #2287 --- web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js index 1bda06798..863a269ef 100644 --- a/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js +++ b/web/pgadmin/tools/sqleditor/templates/sqleditor/js/sqleditor.js @@ -3132,7 +3132,7 @@ define( $("#btn-flash").prop('disabled', true); - if (explain_prefix != undefined) + if (explain_prefix != undefined && !sql.trim().toUpperCase().startsWith("EXPLAIN")) sql = explain_prefix + ' ' + sql; self.query_start_time = new Date();