Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 50826 invoked from network); 28 Jan 2011 07:28:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 28 Jan 2011 07:28:11 -0000 Received: (qmail 82394 invoked by uid 500); 28 Jan 2011 07:28:11 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 82178 invoked by uid 500); 28 Jan 2011 07:28: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 81693 invoked by uid 99); 28 Jan 2011 07:28:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jan 2011 07:28:07 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Jan 2011 07:28:05 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0S7RinK014232 for ; Fri, 28 Jan 2011 07:27:44 GMT Message-ID: <24382215.259411296199664008.JavaMail.jira@thor> Date: Fri, 28 Jan 2011 02:27:44 -0500 (EST) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Assigned: (DERBY-4988) ALTER TABLE DROP COLUMN should make use of information in SYSTRIGGERS to detect column used through REFERENCING clause to find trigger dependencies In-Reply-To: <30540651.259391296199663447.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-4988?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mamta A. Satoor reassigned DERBY-4988: -------------------------------------- Assignee: Mamta A. Satoor > ALTER TABLE DROP COLUMN should make use of information in SYSTRIGGERS to detect column used through REFERENCING clause to find trigger dependencies > --------------------------------------------------------------------------------------------------------------------------------------------------- > > Key: DERBY-4988 > URL: https://issues.apache.org/jira/browse/DERBY-4988 > Project: Derby > Issue Type: Bug > Components: SQL > Affects Versions: 10.7.1.1 > Reporter: Mamta A. Satoor > Assignee: Mamta A. Satoor > > At the time of ALTER TABLE DROP COLUMN, Derby checks if the column being dropped in a trigger column and if so, then it will not drop the column if it is being done in RESTRICT mode or it will drop the trigger while dropping the column in CASCADE mode. This does not implement SQL standard to it's entirety. > ************************************** > SQL standard says following about ALTER TABLE DROP COLUMN RESTRICT and trigger dependency in CREATE TRIGGER section > If RESTRICT is specified, then C shall not be referenced in any of the following > d) Either an explicit trigger column list or a triggered action column set of any trigger descriptor. > (The triggered action column set included in the trigger descriptor is the set of all distinct, fully qualified names of columns contained in the .) > ************************************** > What is missing from Derby implementation from SQL standard point of view is detected triggered action column set. > Starting 10.7(with DERBY-1482), Derby started keeping track of trigger action columns which are referenced through REFERENCING clause. This information can be used to improve the behavior of ALTER TABLE DROP COLUMN in 10.7 and higher. This will not cover all the trigger action columns since columns referenced without the REFERENCING clause are not tracked anywhere at this point. More work will need to be done to implement SQL standard completely. But we can take a step forward by using the information available in 10.7 and higher to detect trigger action columns which are referenced through REFERENCING clause -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.