You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "liu ming (JIRA)" <ji...@apache.org> on 2016/05/13 16:48:12 UTC
[jira] [Commented] (TRAFODION-1256) LP Bug: 1461134 - ALTER TABLE
DROP COLUMN does not check for dependent objects
[ https://issues.apache.org/jira/browse/TRAFODION-1256?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15282867#comment-15282867 ]
liu ming commented on TRAFODION-1256:
-------------------------------------
tested in latest build:
>>CREATE TABLE T13 (A INT NOT NULL PRIMARY KEY, B INT);
--- SQL operation complete.
>>CREATE VIEW V1 AS SELECT B FROM T13;
--- SQL operation complete.
>>ALTER TABLE T13 DROP COLUMN B;
*** ERROR[4003] Column TRAFODION.SEABASE.T13.B is not a column in table TRAFODION.SEABASE.T13, or, after a NATURAL JOIN or JOIN USING, is no longer allowed to be specified with a table correlation name.
*** ERROR[1404] Column B cannot be altered. Reason: Error occurred while recreating views due to dependency on older column definition. Drop dependent views before doing the alter.
--- SQL operation failed with errors.
>>
so this JIRA can be closed?
> LP Bug: 1461134 - ALTER TABLE DROP COLUMN does not check for dependent objects
> ------------------------------------------------------------------------------
>
> Key: TRAFODION-1256
> URL: https://issues.apache.org/jira/browse/TRAFODION-1256
> Project: Apache Trafodion
> Issue Type: Bug
> Components: sql-cmu
> Reporter: Cliff Gray
> Assignee: Anoop Sharma
> Priority: Critical
> Fix For: 2.0-incubating
>
>
> Before dropping a column, a check should be made for objects that depend on the column.
> Example:
> CREATE TABLE T1 (A INT NOT NULL PRIMARY KEY, B INT);
> CREATE VIEW V1 AS SELECT B FROM T1;
> ALTER TABLE T1 DROP COLUMN B; -- should fail
> At a minimum RESTRICT behavior should be supported. Ideally, CASCADE would be supported as well.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)