From: Pavan Deolasee Date: Wed, 7 Sep 2016 04:55:52 +0000 (+0530) Subject: Properly quote database name while dropping it on remote node X-Git-Tag: XL_10_R1BETA1~569 X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=44e128b444898e01de3cc3d27738b4161ad8658c;p=postgres-xl.git Properly quote database name while dropping it on remote node Per bug report by Răzvan-Sebastian Botez --- diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c index cc8e06e8e7..b73be0ab6e 100644 --- a/src/backend/tcop/utility.c +++ b/src/backend/tcop/utility.c @@ -807,7 +807,8 @@ standard_ProcessUtility(Node *parsetree, DropDBCleanConnection(stmt->dbname); /* Clean also remote Coordinators */ - sprintf(query, "CLEAN CONNECTION TO ALL FOR DATABASE %s;", stmt->dbname); + sprintf(query, "CLEAN CONNECTION TO ALL FOR DATABASE %s;", + quote_identifier(stmt->dbname)); ExecUtilityStmtOnNodes(query, NULL, sentToRemote, true, EXEC_ON_ALL_NODES, false); }