Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 62771 invoked from network); 10 Sep 2006 20:03:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 10 Sep 2006 20:03:09 -0000 Received: (qmail 4836 invoked by uid 500); 10 Sep 2006 20:03:08 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 4794 invoked by uid 500); 10 Sep 2006 20:03:08 -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 4772 invoked by uid 99); 10 Sep 2006 20:03:08 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 10 Sep 2006 13:03:08 -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; Sun, 10 Sep 2006 13:03:07 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2AE687142D9 for ; Sun, 10 Sep 2006 19:59:29 +0000 (GMT) Message-ID: <21496112.1157918369173.JavaMail.jira@brutus> Date: Sun, 10 Sep 2006 12:59:29 -0700 (PDT) From: "Bryan Pendleton (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Commented: (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=comments#action_12433730 ] Bryan Pendleton commented on DERBY-1489: ---------------------------------------- I investigated the dependency manager to see how it handles column permissions. It doesn't appear to track dependencies between column permissions and the underlying columns. I sent a message to the derby-dev list to inquire about this part of the GRANT implementation. I've been studying how DROP COLUMN handles triggers which mention this column, to see if that holds some clues for how to handle GRANTs which mention this column. DROP COLUMN locates such triggers by asking the DataDictionary for a list of all triggers on this table, then iterates through the list, asking each trigger which columns it references, and then either cascades the DROP to the affected trigger or fails the DROP, depending on whether the user said CASCADE or RESTRICT. Unfortunately, there don't appear to be analogous methods for column permissions in the data dictionary to allow retrieval of all the column permissions on this table, for example. So, for now, I don't have a way to handle GRANTed column permissions when dropping a column from a table, and this appears to be a blocker problem for this feature. > 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.1.3.1, 10.1.3.0, 10.1.2.1, 10.1.1.0, 10.0.2.1, 10.0.2.0, 10.2.1.0 > Reporter: Bryan Pendleton > Assigned To: Bryan Pendleton > Attachments: dropColumn_2.diff, dropColumn_v3_view_drop.diff, dropColumn_v4_grant_tests.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