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
root@:26257/test> create table test (a int primary key);
CREATE TABLE
root@:26257/test> insert into test values (1) on conflict(a) do nothing;
INSERT 1
root@:26257/test> insert into test values (1) on conflict(a) do nothing;
INSERT 1
The second insert should return INSERT 0, as no inserts were performed. This is what Postgres does as well:
jordan=# create table test (a int primary key);
CREATE TABLE
jordan=# insert into test values(1) on conflict do nothing;
INSERT 0 1
jordan=# insert into test values(1) on conflict do nothing;
INSERT 0 0
The second insert should return
INSERT 0
, as no inserts were performed. This is what Postgres does as well:Found via #20985.
The text was updated successfully, but these errors were encountered: