db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yip Ng (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1490) Provide ALTER TABLE RENAME COLUMN functionality
Date Mon, 06 Nov 2006 19:05:38 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1490?page=comments#action_12447504 ] 
            
Yip Ng commented on DERBY-1490:
-------------------------------

The _v3 patch applies cleanly.   There is one minor problem with the error message when attempting
to rename:

(1) A non-existing table (Rajesh has already commented on this one). e.g.:

ij> rename column t2.c1 to w2;
ERROR 42Y55: 'ALTER TABLE' cannot be performed on 'T2' because it does not exist

(2) Renaming a column on a view.  e.g.:

ij> create view v1 as select * from t1;
0 rows inserted/updated/deleted
ij> rename column v1.w1 to y1;
ERROR 42Y62: 'ALTER TABLE' is not allowed on 'APP.V1' because it is a view.


Both forms has the string 'ALTER TABLE' which should be 'RENAME COLUMN'.    Other than that,
The patch looks great!  +1 to commit.


> Provide ALTER TABLE RENAME COLUMN functionality
> -----------------------------------------------
>
>                 Key: DERBY-1490
>                 URL: http://issues.apache.org/jira/browse/DERBY-1490
>             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.6, 10.1.2.1, 10.1.3.1
>            Reporter: Bryan Pendleton
>         Assigned To: Bryan Pendleton
>         Attachments: 1490_cannot_patch.jpg, derby1490_v1_needMoreTests.diff, renameColumn_v2_with_tests.diff,
renameColumn_v3_after_review.diff
>
>
> Provide a way to rename a column in an existing table. Possible syntax could be:
>   ALTER TABLE tablename RENAME COLUMN oldcolumn TO newcolumn;
> Feature should properly handle the possibility that the column is currently used in constraints,
views, indexes, triggers, 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

        

Mime
View raw message