Skip to content

Table definition doesn't match with insert statement #9

@jsnain

Description

@jsnain

Insert statement as below doesn't match with table definition

try {
int32_t va[] = { 200, 300, 400 };
db.query_first("insert into test(Name, CreateTime, va, percent) values($1, LOCALTIMESTAMP, $2, $3) returning ID", std::forward_as_tuple("test_user", va, std::make_pair(11, 22)), id);
}

Below Table definition doesn't have VA and percent
CREATE TABLE test (
id int4 NOT NULL GENERATED BY DEFAULT AS IDENTITY (
INCREMENT 1
MINVALUE 1
MAXVALUE 2147483647
START 1
),
name varchar(255) COLLATE default,
createtime timestamp(6)
)
;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions