Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-16860

Sql. Ability to create table with autogenerated PK values

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-beta1
    • sql

    Description

      To make it easier for users to migrate from systems which allow table without PK, let's introduce an ability to create tables with PK whose value is autogenerated by system function. The syntax could look like this:

      CREATE TABLE my_table (id UUID DEFAULT gen_random_uuid PRIMARY KEY, <other columns>)

      Where gen_random_uuid is a system function returning a random UUID value.

      Within this ticket we need to update grammar for CREATE TABLE operation and make all sql-runtime related changes to properly handle such default values. 

      Attachments

        Issue Links

          Activity

            People

              korlov Konstantin Orlov
              korlov Konstantin Orlov
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h