You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
The text was updated successfully, but these errors were encountered:
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?
The text was updated successfully, but these errors were encountered: