I am trying to implement an upsert in postgres (an insert on constraint update). This is what my sql looks like:
INSERT into "foo" ("bar", "moo", "baz") VALUES (1, 2, 3), (3, 4, 5)
ON CONFLICT ON CONSTRAINT "composite_primary_key" DO NOTHING
I want to modify the DO NOTHING
to something that will allow me to update ALL the fields for that row. I am not sure what the syntax should be since the docs do not explain it and there are not examples that do this.
Thanks!