, v9.1, 4 , PostgreSQL v9.5 - INSERT ON CONFLICT β¦ DO NOTHING:
INSERT INTO live.users("website", "age") VALUES('abc', '123') ON CONFLICT ("age") DO NOTHING
It is worth noting that this requires an appropriate restriction configured on the target table, but in most cases, I assume that you will get it anyway. Otherwise, you will receive:
ERROR: there is no unique or exclusion constraint matching the ON CONFLICT specification
source
share