My INSERT was working with syntax
INSERT INTO t SELECT * FROM fdw_t
ON CONFLICT DO NOTHING;
Now I need to change it by adding UPDATE, but preserving all same conditctions, how to do it?
This is working, but it is not "all same condictions":
INSERT INTO t
SELECT * FROM fdw_t
ON CONFLICT (id) -- why I need to add this specific and not generic condiction???
DO UPDATE
SET id = EXCLUDED.id, etc1 = EXCLUDED.etc1, etc2 = EXCLUDED.etc2;
I need also in UPDATE "all usable constraints", not only one constranct. The Guide about conflict_target says that
conflict_target must be provided
so, how to provide the "all usable constraints"?