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] Commented: (DERBY-1489) Provide ALTER TABLE DROP COLUMN functionality
Date Sat, 23 Sep 2006 00:13:24 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1489?page=comments#action_12437036 ] 
Bryan Pendleton commented on DERBY-1489:

Hmmm... The column permissions may be a bit tougher than I thought.
Here's an interesting case:

create table t (a int, b int, c int, d int);
grant select(a,c,d) on t to bryan;
alter table t drop column c;

In this case, we want the existing permissions for columns "a" and "d"
to be preserved after the drop of column "c"

In fact, it seems like we may have to do some relatively tricky processing
of the SYSCOLPERMS table during DROP COLUMN because the
column permissions are recorded by column position number, and the
column permission numbers can change during DROP COLUMN.

Previously, I had thought that we just had to scan through SYSCOLPERMS
and delete the corresponding rows, but now I see that we need to check
the rows and re-write them to reflect the changed column position numbers
as well as the dropped column.

> 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:,,,,,,
>            Reporter: Bryan Pendleton
>         Assigned To: Bryan Pendleton
>         Attachments: drop_column_v5_grant_tests.diff, dropColumn_2.diff, dropColumn_v3_view_drop.diff,
> Provide a way to drop a column from an existing table. Possible syntax would be:
> 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


View raw message