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

Cannot insert row when a generated column references an identity column

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 10.5.1.1, 10.6.1.0
    • SQL
    • None

    Description

      ij> create table t (c1 int generated always as identity, c2 generated always as (c1));
      0 rows inserted/updated/deleted
      ij> insert into t values (default, default);
      ERROR 23502: Column 'C2' cannot accept a NULL value.

      Preferably, this should work. Alternatively, if it is not supposed to work, it should fail when the table is created and the error message should state that a generated column is not allowed to reference an identity column.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rhillegas Richard N. Hillegas
            knutanders Knut Anders Hatlen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment