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

Bryan Pendleton commented on DERBY-3605:
----------------------------------------

I think maybe this is just a documentation problem, and that sentence can 
simply be
removed from the RENAME TABLE page in the reference guide.

Please note that the sentence says "can be renamed", not "cannot be renamed".
I think this might be confusing; people might have thought it was saying that 
the
table *cannot* be renamed if there is an index defined on it, but I think that 
the
documentation is correctly stating that the table *can* be renamed if there is 
an
index defined on it.

As far as I know, a table can be renamed even if it has one or more indexes on 
it,
and we have at least 1 regression test (in RenameTableTest.java) which verifies 
this.

Perhaps the best thing to do would be to re-word that sentence slightly:

  Note that a table can be renamed even if it has one or more indexes defined 
on it;
  the presence of an index defined on the table does not prevent the table from
  being renamed.

Or, we could just remove the sentence.

> Remove restriction "If there is an index defined on the table, the table can 
> be renamed."
> -----------------------------------------------------------------------------------------
>
>                 Key: DERBY-3605
>                 URL: https://issues.apache.org/jira/browse/DERBY-3605
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.3.2.1
>         Environment: N/A
>            Reporter: Oleksandr Alesinskyy
>
> Remove following restriction for "RENAME TABLE" statement:
> "If there is an index defined on the table, the table can be renamed."
> I really do not see any valid reasons (except, probably not very wise 
> implementation) for existence this restriction. And it may come  very 
> inconvinient if table to be renamed has an index(ses) referenced by foreign 
> keys from other tables.
> Regards,
> Oleksandr

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to