Derby
  1. Derby
  2. DERBY-1926

Provide documentation for ALTER TABLE DROP COLUMN

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.3.1.4
    • Fix Version/s: 10.3.1.4
    • Component/s: Documentation
    • Labels:
      None

      Description

      The documentation will need to be updated after DERBY-1489 is committed. The reference manual will need to describe how to use the new ALTER TABLE DROP COLUMN feature to drop a column from a table.

      The documentation for the ALTER TABLE command is becoming somewhat unwieldy, so perhaps there is a way to restructure the page to make it easier and more approachable.

      In the documentation, it will be important to clearly describe the RESTRICT and CASCADE behaviors, as users may be confused by what things cause RESTRICT to refuse to drop a column. The comments in AlterTableConstantAction.java may help.

      Specifically, the documentation should note these possibly unexpected behaviors:

      • If a column is present in one or more indexes, these indexes by themselves do not cause
        RESTRICT to refuse to drop a column. Instead, the column will simply be dropped from
        the index, and if that was the last column in that index, the entire index will be dropped.
      • Explicitly named CHECK constraints will cause RESTRICT to refuse to drop a column, as
        will PRIMARY KEY, FOREIGN KEY, and UNIQUE constrants. However, an unnamed simple
        NOT NULL constraint on a column will NOT cause RESTRICT to refuse to drop it.
      1. dropCol1.diff
        3 kB
        Bryan Pendleton

        Issue Links

          Activity

          Bryan Pendleton created issue -
          Bryan Pendleton made changes -
          Field Original Value New Value
          Link This issue depends upon DERBY-1489 [ DERBY-1489 ]
          Bryan Pendleton made changes -
          Assignee Bryan Pendleton [ bryanpendleton ]
          Bryan Pendleton made changes -
          Attachment dropCol1.diff [ 12342668 ]
          Bryan Pendleton made changes -
          Derby Info [Patch Available]
          Bryan Pendleton made changes -
          Fix Version/s 10.3.0.0 [ 12310800 ]
          Status Open [ 1 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Derby Info [Patch Available]
          Bryan Pendleton made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Dag H. Wanvik made changes -
          Issue Type New Feature [ 2 ] Improvement [ 4 ]
          Gavin made changes -
          Workflow jira [ 12386122 ] Default workflow, editable Closed status [ 12801467 ]

            People

            • Assignee:
              Bryan Pendleton
              Reporter:
              Bryan Pendleton
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development