db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DERBY-3888) ALTER TABLE ... ADD COLUMN cannot add identity columns
Date Fri, 16 May 2014 13:56:31 GMT

     [ https://issues.apache.org/jira/browse/DERBY-3888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Knut Anders Hatlen updated DERBY-3888:

    Attachment: reenable-v2.diff

The patch [^reenable-v2.diff] contains some additional improvements:

- Fix the problem with dropping columns/tables after adding an identity column by creating
a backing sequence for the column (copied code from CreateTableConstantAction, added in DERBY-6452).

- Forbid adding an identity column to a table that already has one.

- Add tests to verify that it works.

It still doesn't allow you to add an identity column to a non-empty table if the column is

While writing tests, I came across a bug that affects ALTER TABLE ... ADD COLUMN in general.
Logged DERBY-6578 to keep track of that problem.

> ALTER TABLE ... ADD COLUMN cannot add identity columns
> ------------------------------------------------------
>                 Key: DERBY-3888
>                 URL: https://issues.apache.org/jira/browse/DERBY-3888
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Knut Anders Hatlen
>            Assignee: Knut Anders Hatlen
>            Priority: Minor
>              Labels: derby_triage10_10
>         Attachments: reenable-v2.diff, reenable.diff
> ALTER TABLE .. ADD COLUMN cannot be used to add an identity column. There is code to
handle identity columns, but it is disabled in the parser. See this thread on derby-user:
> http://mail-archives.apache.org/mod_mbox/db-derby-user/200708.mbox/%3C46C5DAA9.8080507@sbcglobal.net%3E
> The code was disabled for DB2 compatibility. Since DB2 compatibility is not a goal for
Derby, we should see if we could re-enable it.

This message was sent by Atlassian JIRA

View raw message