In Postgres, when you combine ON CONFLICT DO NOTHING with RETURNING, the conflicting rows are not returned.
To Reproduce
CREATE TABLE example (id bigint PRIMARY KEY);
INSERT INTO example (id) VALUES (1) RETURNING *;
-- id: 1
INSERT INTO example (id) VALUES (1) ON CONFLICT DO NOTHING RETURNING *;
-- id: 1 (WRONG)
Describe the bug
In Postgres, when you combine
ON CONFLICT DO NOTHING
withRETURNING
, the conflicting rows are not returned.To Reproduce
pg-mem version
2.6.13