pg_pathman
pg_pathman copied to clipboard
ON CONFLICT clause is not supported with partitioned tables
postgres 12.5 An error occurred when I tried to use upsert to update my main table; but when I use the traditional way: CREATE TABLE o(id INT PRIMARY KEY, i INT) PARTITION BY RANGE (id); CREATE TABLE o1 PARTITION OF o FOR VALUES FROM (1) TO (1000); CREATE TABLE o2 PARTITION OF o FOR VALUES FROM (1000) TO (2000);
INSERT INTO o(id, i) VALUES (1,1),(2,2),(1500,1500);
INSERT INTO o(id, i) VALUES (1500, 1400), (2,20), (3, 3) ON CONFLICT (id) DO UPDATE SET i = EXCLUDED.i; it is ok. why?