Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-3605

Remove confusing statement "If there is an index defined on the table, the table can be renamed."

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.3.2.1
    • Fix Version/s: 10.6.1.0
    • Component/s: Documentation
    • Labels:
      None
    • Environment:
      N/A
    • Urgency:
      Normal

      Description

      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

      1. docs.diff
        0.9 kB
        Bryan Pendleton
      2. rrefsqljrenametablestatement.html
        4 kB
        Bryan Pendleton

        Activity

        Hide
        bryanpendleton Bryan Pendleton added a comment -

        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.

        Show
        bryanpendleton Bryan Pendleton added a comment - 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.
        Hide
        dagw Dag H. Wanvik added a comment -

        I'd be ok just removing this sentence. But either way is fine with me. +1

        Show
        dagw Dag H. Wanvik added a comment - I'd be ok just removing this sentence. But either way is fine with me. +1
        Hide
        bryanpendleton Bryan Pendleton added a comment -

        Reclassified as a documentation issue.

        Show
        bryanpendleton Bryan Pendleton added a comment - Reclassified as a documentation issue.
        Hide
        bryanpendleton Bryan Pendleton added a comment -

        Attached is the patch to remove the confusing sentence, and the HTML page that results.

        Show
        bryanpendleton Bryan Pendleton added a comment - Attached is the patch to remove the confusing sentence, and the HTML page that results.
        Hide
        chaase3 Kim Haase added a comment -

        Looks fine to me – thanks, Bryan.

        Show
        chaase3 Kim Haase added a comment - Looks fine to me – thanks, Bryan.
        Hide
        bryanpendleton Bryan Pendleton added a comment -

        Thanks Kim! Committed to the documentation trunk as revision 886824.

        Show
        bryanpendleton Bryan Pendleton added a comment - Thanks Kim! Committed to the documentation trunk as revision 886824.

          People

          • Assignee:
            bryanpendleton Bryan Pendleton
            Reporter:
            al0 Oleksandr Alesinskyy
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development