You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by hu...@apache.org on 2016/01/22 06:57:50 UTC
incubator-hawq git commit: HAWQ-229. Forbid altering external table
through altering table.
Repository: incubator-hawq
Updated Branches:
refs/heads/master 0fd03f2d3 -> 2c3584178
HAWQ-229. Forbid altering external table through altering table.
Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/2c358417
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/2c358417
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/2c358417
Branch: refs/heads/master
Commit: 2c35841780d83fafb11ef51aad3e3fe3397982b8
Parents: 0fd03f2
Author: doli <do...@pivotal.io>
Authored: Fri Jan 22 11:57:39 2016 +0800
Committer: Ruilong Huo <rh...@pivotal.io>
Committed: Fri Jan 22 13:57:26 2016 +0800
----------------------------------------------------------------------
src/backend/commands/tablecmds.c | 28 +++++-----------------------
1 file changed, 5 insertions(+), 23 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/2c358417/src/backend/commands/tablecmds.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c
index 6126b7e..a2c98bf 100644
--- a/src/backend/commands/tablecmds.c
+++ b/src/backend/commands/tablecmds.c
@@ -3522,29 +3522,11 @@ void ATVerifyObject(AlterTableStmt *stmt, Relation rel)
}
else if (RelationIsExternal(rel) && stmt->relkind != OBJECT_EXTTABLE)
{
- /*
- * special case: in order to support 3.3 dumps with ALTER TABLE OWNER of
- * external tables, we will allow using ALTER TABLE (without EXTERNAL)
- * temporarily, and use a deprecation warning. This should be removed
- * in future releases.
- */
- if(stmt->relkind == OBJECT_TABLE)
- {
- if (Gp_role == GP_ROLE_DISPATCH) /* why are WARNINGs emitted from all segments? */
- ereport(WARNING,
- (errcode(ERRCODE_WRONG_OBJECT_TYPE),
- errmsg("\"%s\" is an external table. ALTER TABLE for external tables is deprecated.", RelationGetRelationName(rel)),
- errhint("Use ALTER EXTERNAL TABLE instead"),
- errOmitLocation(true)));
- }
- else
- {
- ereport(ERROR,
- (errcode(ERRCODE_WRONG_OBJECT_TYPE),
- errmsg("\"%s\" is an external table", RelationGetRelationName(rel)),
- errhint("Use ALTER EXTERNAL TABLE instead"),
- errOmitLocation(true)));
- }
+ ereport(ERROR,
+ (errcode(ERRCODE_WRONG_OBJECT_TYPE),
+ errmsg("\"%s\" is an external table", RelationGetRelationName(rel)),
+ errhint("Use ALTER EXTERNAL TABLE instead"),
+ errOmitLocation(true)));
}
else if (!RelationIsExternal(rel) && !RelationIsForeign(rel) && stmt->relkind != OBJECT_TABLE)
{