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] Updated: (DERBY-1489) Provide ALTER TABLE DROP COLUMN functionality
Date Sat, 26 Aug 2006 15:40:23 GMT
     [ http://issues.apache.org/jira/browse/DERBY-1489?page=all ]

Bryan Pendleton updated DERBY-1489:
-----------------------------------

    Attachment: dropColumn_v3_view_drop.diff

Attached is dropColumn_v3_view_drop.diff, a patch proposal which supercedes
the previous patch proposal. This patch proposal adds some changes to the
dependency manager's handling of views so that DROP COLUMN CASCADE
now is able to drop a dependent view.

The new patch uses a technique similar to that used by REVOKE PRIVILEGE
to cause the view to be dropped when CASCADE is specified. The differences
between this patch and the previous patch are as follows:
 - Added the new field DependencyManager.DROP_COLUMN_RESTRICT
 - ViewDescriptor now includes handling for DROP_COLUMN and
   DROP_COLUMN_RESTRICT: if RESTRICT is specified, a dependent view
   causes the DROP COLUMN to fail; if RESTRICT is *not* specified, a
   dependent view is automatically dropped when the column is dropped.
 - SPSDescriptor, which was the only other user of DependencyManager.DROP_COLUMN,
   treats DROP_COLUMN and DROP_COLUMN_RESTRICT identically.
 - When AlterTableConstantAction calls the DependencyManager, it passes
   either DROP_COLUMN or DROP_COLUMN_RESTRICT, depending on
   what the user specified.

Tests and test output is also updated to match the new correct results.

This patch is not ready for commit yet, because I need to address the interactions
with GRANT/REVOKE, but that will require investigating DERBY-1583.

In the meantime, feedback on this patch would be very welcome!


> 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: 10.0.2.0, 10.0.2.1, 10.1.1.0, 10.2.1.0, 10.1.2.1, 10.1.3.0, 10.1.3.1
>            Reporter: Bryan Pendleton
>         Assigned To: Bryan Pendleton
>         Attachments: dropColumn_2.diff, dropColumn_v3_view_drop.diff
>
>
> Provide a way to drop a column from an existing table. Possible syntax would be:
>   ALTER TABLE tablename DROP COLUMN columnname CASCADE / RESTRICT;
> 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

        

Mime
View raw message