db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rajesh Kartha (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-1490) Provide ALTER TABLE RENAME COLUMN functionality
Date Sun, 05 Nov 2006 20:23:18 GMT
    [ http://issues.apache.org/jira/browse/DERBY-1490?page=comments#action_12447318 ] 
Rajesh Kartha commented on DERBY-1490:

The latest patch applied successfully.

An initial observations:

Rename column of a non-existent table throws an ' ALTER TABLE" error:

ij> create table btab (i int, j varchar(100));
0 rows inserted/updated/deleted
ij> rename column btab1.i to id;
ERROR 42Y55: 'ALTER TABLE' cannot be performed on 'BTAB1' because it does not exist.

I would expect this to be consistent to following

ij> rename table abcd to bcd;
ERROR 42Y55: 'RENAME TABLE' cannot be performed on 'ABCD' because it does not exist.

Will try out some other scenarios and provide further comments for the new patch.

Meanwhile,  I was thinking:

Like 'RENAME COLUMN" isn't  'RENAME CONSTRAINT'  a good feature to have in Derby ? 

Currently it  is a two step process:

With a 'RENAME CONSTRAINT'  this can be done in a single step.

Maybe I will open a JIRA  enhancement request to track this.


> 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:,,,,,
>            Reporter: Bryan Pendleton
>         Assigned To: Bryan Pendleton
>         Attachments: 1490_cannot_patch.jpg, derby1490_v1_needMoreTests.diff, renameColumn_v2_with_tests.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


View raw message