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. [Forced Update!]
Date Fri, 29 Jan 2016 03:31:14 GMT
Repository: incubator-hawq
Updated Branches:
  refs/heads/HAWQ-369 26d9c1a08 -> 4efaa85f9 (forced update)


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

Branch: refs/heads/HAWQ-369
Commit: 4efaa85f94a21dd780b690610e66c08754414b12
Parents: 226a55c
Author: Oleksandr Diachenko <odiachenko@pivotal.io>
Authored: Thu Jan 28 19:31:02 2016 -0800
Committer: Oleksandr Diachenko <odiachenko@pivotal.io>
Committed: Thu Jan 28 19:31:02 2016 -0800

----------------------------------------------------------------------
 doc/src/sgml/ref/alter_database.sgml |  4 ++++
 src/backend/commands/dbcommands.c    | 11 ++++++++---
 src/include/utils/errcodes.h         |  1 +
 3 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4efaa85f/doc/src/sgml/ref/alter_database.sgml
----------------------------------------------------------------------
diff --git a/doc/src/sgml/ref/alter_database.sgml b/doc/src/sgml/ref/alter_database.sgml
index 8ddff97..191a513 100755
--- a/doc/src/sgml/ref/alter_database.sgml
+++ b/doc/src/sgml/ref/alter_database.sgml
@@ -154,6 +154,10 @@ ALTER DATABASE <replaceable class="PARAMETER">name</replaceable>
OWNER TO <repla
    User-specific settings override database-specific
    ones if there is a conflict.
   </para>
+
+  <para>
+   Currently RENAME TO is supported only when called by pgdump utility.
+  </para>
  </refsect1>
 
  <refsect1>

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4efaa85f/src/backend/commands/dbcommands.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index f80e01a..06b0d4a 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -850,9 +850,14 @@ createdb(CreatedbStmt *stmt)
 	 * we're willing to accept the less friendly message in that case.
 	 */
 	if (OidIsValid(get_database_oid(dbname)))
-		ereport(ERROR,
-				(errcode(ERRCODE_DUPLICATE_DATABASE),
-				 errmsg("database \"%s\" already exists", dbname)));
+			if (strcmp(dbname, "hcatalog") == 0)
+				ereport(ERROR,
+						(errcode(ERRCODE_RESERVED_HCATALOG_NAME),
+						 errmsg("hcatalog is a reserved name for hcatalog feature integration")));
+			else
+				ereport(ERROR,
+						(errcode(ERRCODE_DUPLICATE_DATABASE),
+						errmsg("database \"%s\" already exists", dbname)));
 
 	/*
 	 * Select an OID for the new database, checking that it doesn't have

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/4efaa85f/src/include/utils/errcodes.h
----------------------------------------------------------------------
diff --git a/src/include/utils/errcodes.h b/src/include/utils/errcodes.h
index b13cf02..2be7ee4 100644
--- a/src/include/utils/errcodes.h
+++ b/src/include/utils/errcodes.h
@@ -294,6 +294,7 @@
 #define ERRCODE_INVALID_NAME				MAKE_SQLSTATE('4','2', '6','0','2')
 #define ERRCODE_NAME_TOO_LONG				MAKE_SQLSTATE('4','2', '6','2','2')
 #define ERRCODE_RESERVED_NAME				MAKE_SQLSTATE('4','2', '9','3','9')
+#define ERRCODE_RESERVED_HCATALOG_NAME		MAKE_SQLSTATE('4','2', '9','4','0')
 #define ERRCODE_DATATYPE_MISMATCH			MAKE_SQLSTATE('4','2', '8','0','4')
 #define ERRCODE_INDETERMINATE_DATATYPE		MAKE_SQLSTATE('4','2', 'P','1','8')
 #define ERRCODE_WRONG_OBJECT_TYPE			MAKE_SQLSTATE('4','2', '8','0','9')


Mime
View raw message