db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <derby-...@db.apache.org>
Subject [jira] Commented: (DERBY-1489) Provide ALTER TABLE DROP COLUMN functionality
Date Fri, 25 Aug 2006 14:39:23 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1489?page=comments#action_12430520 ] 
Bryan Pendleton commented on DERBY-1489:

The issue with views which are dependent on the column being dropped seems to involve
the handling of the prepareToInvalidate() and makeInvalid() methods in the
org.apache.derby.iapi.sql.dictionary.ViewDescriptor class.

As a first experiment, I tried adding case statements for DependencyManager.DROP_COLUMN
into both methods:
 in prepareToInvalidate, break
 in makeInvalid, call dropViewWork

This partially fixes the problem: now ALTER TABLE DROP COLUMN drops any view which
is dependent on that column.

However, with this change, the view is dropped regardless of whether I say CASCADE or RESTRICT.

I notice that ViewDescriptor has handling for REVOKE_PRIVILEGE and REVOKE_PRIVILEGE_RESTRICT,
and I wonder: should I create a DependencyManager.DROP_COLUMN_RESTRICT and mimic
the handling of REVOKE_PRIVILEGE?

> Provide ALTER TABLE DROP COLUMN functionality
> ---------------------------------------------
>                 Key: DERBY-1489
>                 URL: http://issues.apache.org/jira/browse/DERBY-1489
>             Project: Derby
>          Issue Type: New Feature
>          Components: Documentation, SQL
>    Affects Versions:,,,,,,
>            Reporter: Bryan Pendleton
>         Assigned To: Bryan Pendleton
>         Attachments: dropColumn_2.diff
> Provide a way to drop a column from an existing table. Possible syntax would be:
> Feature should properly handle columns which are used in constraints, views, triggers,
indexes, etc.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message