db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Pendleton (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DERBY-6904) Enhance ALTER TABLE to allow CYCLE option to be changed.
Date Thu, 09 Mar 2017 03:03:37 GMT

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

Bryan Pendleton commented on DERBY-6904:

Thanks for attaching your first patch. It looks very clean to me.

It would be great if you can add your test cases to the existing test suites,
that would be very useful.

I'm also quite interested to hear what problems you encounter with the
existing test suites when running with these changes.

I agree with you, the odd behavior with SYSCOLUMNS is precisely that
which is described by DERBY-6579. From my point of view, the resolution
of DERBY-6579 is that the behavior of SYSCOLUMNS is *not* ideal, but
so far the community has felt that the behavior is not worth changing.

A long time ago, Derby's implementation of "GENERATED ... AS IDENTITY"
columns stored the generator value in SYSCOLUMNS, but several
releases ago the implementation was switched to use SYSSEQUENCES,
and the value in SYSCOLUMNS is no longer relevant to the behavior of
the generated column.

Therefore, it has not seemed necessary to fix DERBY-6579.

> Enhance ALTER TABLE to allow CYCLE option to be changed.
> --------------------------------------------------------
>                 Key: DERBY-6904
>                 URL: https://issues.apache.org/jira/browse/DERBY-6904
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions:
>            Reporter: Bryan Pendleton
>            Priority: Minor
>         Attachments: 6904.diff
> It would be nice to have a variant of the ALTER TABLE statement,
> similar to the SET INCREMENT BY or SET RESTART WITH variants,
> that allowed a user to change the CYCLE option on an IDENTITY column.
> I think that the code flow for this could be closely modelled on the
> code flow for the SET INCREMENT BY variant: after the statement
> is parsed, we simply need to drop and recreate the underlying SEQUENCE
> object with the desired CYCLE option (and preserving all the other
> aspects of the underlying SEQUENCE object.

This message was sent by Atlassian JIRA

View raw message