Skip to content

Insert ON CONFLICT parsed failed when composite primary multi columns #1633

Closed
@leotu

Description

@leotu

Ref: #1630

Failed when composite primary keys (id_1+id_2) --> "ON CONFLICT (id_1, id_2)"

INSERT into test_data (id_1, id_2, my_string_1, my_string_2)
VALUES ('id_1_A', 'id_2_A', 'my_string_1-new', 'my_string_2-new')
ON CONFLICT (id_1, id_2) DO UPDATE 
SET my_string_1 = 'my_string_1-update', my_string_2 = 'my_string_2-update';

Screenshot:
截圖 2022-09-16 11 46 10

DB tools validation successfully:

(1) Left is schema, right is sample data:
截圖 2022-09-16 11 44 40

(2) Executed successfully:
截圖 2022-09-16 11 45 23

(3) Update sample data:
截圖 2022-09-16 11 45 44

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions