tarantool / tarantool/doc

Support `INSERT INTO table DEFAULT VALUES` in SQL triggers

Open
#5,707 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
CSS
Stars
15
Forks
49
Avg merge
1d 13h
Merged PRs (30d)
3

Description

SQL triggers now support the INSERT INTO table DEFAULT VALUES statement.
Note that this is primarily a parser change, as prior to this patch,
it was possible to insert default values into all but one column
by inserting into a single column, for example:

CREATE TABLE t1(i INT PRIMARY KEY);
CREATE TABLE t2(i INT PRIMARY KEY AUTOINCREMENT, a INT DEFAULT 1,
                b INT DEFAULT 2, c INT DEFAULT 3);
CREATE TRIGGER t1t AFTER INSERT ON t1 FOR EACH ROW BEGIN
    INSERT INTO t2(i) VALUES (NULL); END;

Requested by @ImeevMA in https://github.com/tarantool/tarantool/commit/62cb643b0083a1346b685818ab89ceb8a3d24766.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No documentation file or test is named. Start by locating the SQL trigger and INSERT syntax documentation in the Tarantool docs, then compare the existing syntax coverage with the stated DEFAULT VALUES support. Done means the relevant documentation accurately reflects this trigger syntax and its scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
sql
Domain
databases, documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.