hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odiache...@apache.org
Subject incubator-hawq git commit: HAWQ-369. Hcatalog as reserved name need regression tests.
Date Sat, 30 Jan 2016 03:06:21 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/HAWQ-369 272abf7e3 -> 00001b84f


HAWQ-369. Hcatalog as reserved name need regression tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/00001b84
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/00001b84
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/00001b84

Branch: refs/heads/HAWQ-369
Commit: 00001b84f8846be3467b2783f164c928d80d6978
Parents: 272abf7
Author: Oleksandr Diachenko <odiachenko@pivotal.io>
Authored: Fri Jan 29 19:06:15 2016 -0800
Committer: Oleksandr Diachenko <odiachenko@pivotal.io>
Committed: Fri Jan 29 19:06:15 2016 -0800

----------------------------------------------------------------------
 src/backend/commands/dbcommands.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/00001b84/src/backend/commands/dbcommands.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index e7d56da..d20accb 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -1544,10 +1544,10 @@ RenameDatabase(const char *oldname, const char *newname)
 	/*
 	 * Make sure "hcatalog" is not used as new name, because it's reserved for
 	 * hcatalog feature integration*/
-	if (strcmp(newname, "hcatalog") == 0)
+	if (strcmp(newname, HcatalogDbName) == 0)
 		ereport(ERROR,
 				(errcode(ERRCODE_RESERVED_HCATALOG_NAME),
-				errmsg("hcatalog is a reserved name for hcatalog feature integration")));
+				errmsg("\"%s\" is a reserved name for hcatalog feature integration", HcatalogDbName)));
 	/*
 	 * Look up the target database's OID, and get exclusive lock on it. We
 	 * need this for the same reasons as DROP DATABASE.
@@ -1576,7 +1576,7 @@ RenameDatabase(const char *oldname, const char *newname)
 	if (db_id == HcatalogDbOid)
 		ereport(ERROR,
 				(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
-				errmsg("permission denied to ALTER DATABASE hcatalog is reserved for system use")));
+				errmsg("permission denied to ALTER DATABASE \"%s\" is reserved for system use", HcatalogDbName)));
 
 	/*
 	 * Make sure the database does not have active sessions.  This is the same


Mime
View raw message