Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The auto-increment feature for multipart PK #947

Closed
TarantoolBot opened this issue Oct 14, 2019 · 4 comments
Closed

The auto-increment feature for multipart PK #947

TarantoolBot opened this issue Oct 14, 2019 · 4 comments
Assignees
Labels
feature A new functionality server [area] Task relates to Tarantool's server (core) functionality sql [location] SQL manual

Comments

@TarantoolBot
Copy link
Collaborator

The auto-increment feature can be set to any INTEGER or UNSIGNED
field of PRIMARY KEY using one of two ways:

  1. AUTOINCREMENT in column definition:
    CREATE TABLE t (i INT, a INT AUTOINCREMENT, PRIMARY KEY (i, a));
    CREATE TABLE t (i INT AUTOINCREMENT, a INT, PRIMARY KEY (i, a));
  2. AUTOINCREMENT in PRIMARY KEY definition:
    CREATE TABLE t (i INT, a INT, PRIMARY KEY (i, a AUTOINCREMENT));
    CREATE TABLE t (i INT, a INT, PRIMARY KEY (i AUTOINCREMENT, a));
    Requested by @ImeevMA in tarantool/tarantool@08c7d7c.
@lenkis lenkis added 2.3 feature A new functionality reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality sql [location] SQL manual and removed reference [location] Tarantool manual, Reference part server [area] Task relates to Tarantool's server (core) functionality labels Oct 15, 2019
@pgulutzan
Copy link
Contributor

SQL constraint definitions will be published when approved.

@veod32
Copy link
Collaborator

veod32 commented Dec 29, 2019

Do we have the description of this feature in our 2.3 documentation? 08c7d7c commit that closes the feature ticket gh-4217 is in the 2.3.1 release scope already.

@pgulutzan
Copy link
Contributor

That part of the documentation has not been approved. Perhaps K. Yukhin knows whether or not it will be approved.

@Totktonada
Copy link
Member

@pgulutzan, can you share the commit? I guess I can review it from correctness point of view and it is enough for now.

I'll ask help from @artembo to push it in the right way (same as for #879).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new functionality server [area] Task relates to Tarantool's server (core) functionality sql [location] SQL manual
Projects
None yet
Development

No branches or pull requests

5 participants