ON CONFLICT refers to constraints that can either be specified using a inference clause (by specifying the columns of a unique constraint) or by naming a unique or exclusion constraint. Added support for PostgreSQL ON CONFLICT .. ON CONSTRAINT .. ON CONSTRAINT .. lukaseder added a commit that referenced this issue Dec 18, 2017 Avoid naming a constraint directly when using ON CONFLICT DO UPDATE PostgreSQL 9.5 will have support for a feature that is popularly known as "UPSERT" - the ability to either insert or update a row according to whether an existing row with the same key exists. ... Postgresql 10 There is no unique or exclusion constraint matching the ON CONFLICT specification. DO NOTHING avoids the constraint violation, without touching the pre-existing row. Please check if it is defined correctly and try using the constraint name directly:... on conflict on constraint