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 Fri, 29 Jan 2016 04:26:03 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/HAWQ-369 a74197c6d -> 4ea15f016


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/4ea15f01
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/4ea15f01
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/4ea15f01

Branch: refs/heads/HAWQ-369
Commit: 4ea15f016fa326a8f9e97b4403a3d9b4ba35b354
Parents: a74197c
Author: Oleksandr Diachenko <odiachenko@pivotal.io>
Authored: Thu Jan 28 20:14:53 2016 -0800
Committer: Oleksandr Diachenko <odiachenko@pivotal.io>
Committed: Thu Jan 28 20:14:53 2016 -0800

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


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4ea15f01/src/backend/commands/dbcommands.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 5205481..360ee96 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -1541,6 +1541,13 @@ RenameDatabase(const char *oldname, const char *newname)
 	cqContext  *pcqCtx;
 
 	/*
+	 * make sure "hcatalog" is not used as new name, because it's reserved for
+	 * hcatalog feature integration*/
+	if (strcmp(newname, "hcatalog") == 0)
+		ereport(ERROR,
+				(errcode(ERRCODE_RESERVED_HCATALOG_NAME),
+				errmsg("hcatalog is a reserved name for hcatalog feature integration")));
+	/*
 	 * Look up the target database's OID, and get exclusive lock on it. We
 	 * need this for the same reasons as DROP DATABASE.
 	 */


Mime
View raw message