Upsert with "Prefer: resolution=merge-duplicates" on specified columns (#1327) (#1432)

Allow query param 'on_conflict=key1,key2,...' to upsert with explicit columns with unique
constraint.
This commit is contained in:
YUKISHITA Yohsuke
2019-12-29 11:52:58 -05:00
committed by Steve Chavez
parent e12c1319b6
commit 99b13fa25f
10 changed files with 91 additions and 2 deletions
+6
View File
@@ -344,6 +344,12 @@ INSERT INTO employees VALUES
TRUNCATE TABLE tiobe_pls CASCADE;
INSERT INTO tiobe_pls VALUES ('Java', 1), ('C', 2), ('Python', 4);
TRUNCATE TABLE single_unique CASCADE;
INSERT INTO single_unique (unique_key, value) VALUES (1, 'A');
TRUNCATE TABLE compound_unique CASCADE;
INSERT INTO compound_unique (key1, key2, value) VALUES (1, 1, 'A');
TRUNCATE TABLE only_pk CASCADE;
INSERT INTO only_pk VALUES (1), (2);