I have two columns in table col1, col2, they both are unique indexed (col1 is unique and so is col2).
col1
col2
I need at insert into this table, u
ON CONFLICT is very clumsy solution, run
UPDATE dupes SET key1=$1, key2=$2 where key3=$3 if rowcount > 0 INSERT dupes (key1, key2, key3) values ($1,$2,$3);
works on Oracle, Postgres and all other database