db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Hillegas (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-4681) Dropping a column in the table drops the views that use this table
Date Thu, 25 Oct 2012 19:31:13 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4681?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13484405#comment-13484405
] 

Rick Hillegas commented on DERBY-4681:
--------------------------------------

Hi Karl,

Off the top of my head I would not recommend the first approach you are considering. Changing
what is stored in the system catalogs is always tricky and will lead to hard-upgrade issues.
Your second approach sounds simpler and will work even after soft-upgrade to the release which
carries your fix. The first approach may run a little faster but I wouldn't worry about optimizing
the performance of a rare DDL statement like ALTER TABLE DROP COLUMN. I think it is better
to avoid the tricky catalog upgrade issues if you can.

If I understand your second approach, you are planning to have the ViewDescriptor compile
itself if the operation is ALTER TABLE DROP COLUMN. That sounds sensible to me. For this approach,
I think that you can use QueryTreeNode.parseStatement() on the text held in ViewDescriptor.getViewText().

Hope this helps,
-Rick
                
> Dropping a column in the table drops the views that use this table
> ------------------------------------------------------------------
>
>                 Key: DERBY-4681
>                 URL: https://issues.apache.org/jira/browse/DERBY-4681
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>    Affects Versions: 10.3.1.4, 10.3.2.1, 10.3.3.0, 10.4.1.3, 10.4.2.0, 10.5.1.1, 10.5.2.0,
10.5.3.0, 10.6.1.0
>         Environment: Windows 7 Enterprise, JDK SE 1.6 u20
>            Reporter: Grzegorz Łyp
>            Priority: Critical
>              Labels: derby_triage10_8
>         Attachments: DERBY-4681-LEADS.txt
>
>
> If i have a table and a view that uses this table, after dropping a column from this
table the whole view is also dropped.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message