4 ms·
There's one HUGE upside for doing it the current way: autogenerated columns. E.g. CREATE TABLE t (id SERIAL PRIMARY KEY, x INTEGER UNIQUE); INSERT IN
by ivoras 6y ago
There's one HUGE upside for doing it the current way: autogenerated columns.
E.g.
CREATE TABLE t (id SERIAL PRIMARY KEY, x INTEGER UNIQUE);
INSERT INTO t (x) VALUES (42), (43) ON CONFLICT DO NOTHING RETURNING *;
This does EXACTLY the most useful thing if one of '42' or '43' conflicts.