Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 92280 invoked from network); 26 Aug 2006 15:43:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Aug 2006 15:43:38 -0000 Received: (qmail 93863 invoked by uid 500); 26 Aug 2006 15:43:37 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 93428 invoked by uid 500); 26 Aug 2006 15:43:36 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 93412 invoked by uid 99); 26 Aug 2006 15:43:36 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Aug 2006 08:43:36 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 26 Aug 2006 08:43:35 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E455241000C for ; Sat, 26 Aug 2006 15:40:23 +0000 (GMT) Message-ID: <32632463.1156606823932.JavaMail.jira@brutus> Date: Sat, 26 Aug 2006 08:40:23 -0700 (PDT) From: "Bryan Pendleton (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-1489) Provide ALTER TABLE DROP COLUMN functionality In-Reply-To: <21326448.1152375449855.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ 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