Skip to content

Support INSERT INTO table DEFAULT VALUES in SQL triggers #5707

Description

@TarantoolBot

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 tarantool/tarantool@62cb643.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions