hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From h...@apache.org
Subject incubator-hawq git commit: HAWQ-488. Fix bug which cannot drop schema madlib and re-deploy MADlib in schema madlib
Date Fri, 04 Mar 2016 05:24:18 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/master daf87806c -> 7715e6c30


HAWQ-488. Fix bug which cannot drop schema madlib and re-deploy MADlib in schema madlib


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

Branch: refs/heads/master
Commit: 7715e6c302c676b27bb778c658617a76224f7c2f
Parents: daf8780
Author: Ruilong Huo <rhuo@pivotal.io>
Authored: Wed Mar 2 23:11:27 2016 -0800
Committer: Ruilong Huo <rhuo@pivotal.io>
Committed: Thu Mar 3 21:23:31 2016 -0800

----------------------------------------------------------------------
 src/backend/commands/schemacmds.c | 12 ++++--------
 src/bin/pg_dump/pg_dump.c         |  4 +---
 2 files changed, 5 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/7715e6c3/src/backend/commands/schemacmds.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/schemacmds.c b/src/backend/commands/schemacmds.c
index eae26c6..3d68dba 100644
--- a/src/backend/commands/schemacmds.c
+++ b/src/backend/commands/schemacmds.c
@@ -280,8 +280,7 @@ RemoveSchema_internal(const char *schemaName, DropBehavior behavior,
 
 	/* Additional check to protect reserved schema names, exclude temp schema */
 	if (!is_internal && !allowSystemTableModsDDL &&
-		((IsReservedName(schemaName) && strncmp(schemaName, "pg_temp", 7) != 0) ||
-		 strcmp(schemaName, "madlib") == 0))
+	    (IsReservedName(schemaName) && strncmp(schemaName, "pg_temp", 7) != 0))
 	{
 		ereport(ERROR,
 				(errcode(ERRCODE_RESERVED_NAME),
@@ -378,8 +377,7 @@ RenameSchema(const char *oldname, const char *newname)
 		aclcheck_error(aclresult, ACL_KIND_DATABASE,
 					   get_database_name(MyDatabaseId));
 
-	if (!allowSystemTableModsDDL &&
-		(IsReservedName(oldname) || strcmp(oldname, "madlib") == 0))
+	if (!allowSystemTableModsDDL && IsReservedName(oldname))
 	{
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),
@@ -387,8 +385,7 @@ RenameSchema(const char *oldname, const char *newname)
 				 errdetail("Schema %s is reserved for system use.", oldname)));
 	}
 
-	if (!allowSystemTableModsDDL &&
-		(IsReservedName(newname) || strcmp(newname, "madlib") == 0))
+	if (!allowSystemTableModsDDL && IsReservedName(newname))
 	{
 		ereport(ERROR,
 				(errcode(ERRCODE_RESERVED_NAME),
@@ -474,8 +471,7 @@ AlterSchemaOwner(const char *name, Oid newOwnerId)
 				(errcode(ERRCODE_UNDEFINED_SCHEMA),
 				 errmsg("schema \"%s\" does not exist", name)));
 
-	if (!allowSystemTableModsDDL &&
-		(IsReservedName(name) || strcmp(name, "madlib") == 0))
+	if (!allowSystemTableModsDDL && IsReservedName(name))
 	{
 		ereport(ERROR,
 				(errcode(ERRCODE_INSUFFICIENT_PRIVILEGE),

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/7715e6c3/src/bin/pg_dump/pg_dump.c
----------------------------------------------------------------------
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index def3833..5b0db00 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -1080,9 +1080,7 @@ selectDumpableNamespace(NamespaceInfo *nsinfo)
 	else if (strncmp(nsinfo->dobj.name, "pg_", 3) == 0 ||
 			 strcmp(nsinfo->dobj.name, "information_schema") == 0 ||
 			 strcmp(nsinfo->dobj.name, "gp_toolkit") == 0 ||
-			 strcmp(nsinfo->dobj.name, "hawq_toolkit") == 0 ||
-			 strcmp(nsinfo->dobj.name, "madlib") == 0 ||
-			 strcmp(nsinfo->dobj.name, "retail_demo") == 0)
+			 strcmp(nsinfo->dobj.name, "hawq_toolkit") == 0)
 		nsinfo->dobj.dump = false;
 	else
 		nsinfo->dobj.dump = true;


Mime
View raw message