Postgres complex insert or update with 2 unique constraints. Added support for PostgreSQL ON CONFLICT .. ON CONSTRAINT .. ON CONSTRAINT .. lukaseder added a commit that referenced this issue Dec 18, 2017 UNIQUE Constraint − Ensures that all values in a column are different. Given the above, you may wonder if regular constraints are subject to the same problem. BUG #16714: INSERT ON CONFLICT DO UPDATE fails to infer constraint if it's not at top-level partition The following bug has been logged on the website: Bug reference: 16714 Logged by: Andy S Email address: [hidden email] PostgreSQL version: 11.2 Operating system: Gentoo Linux … But for some reason my query saying constraint doesn't exist (when it does). Please check if it is defined correctly and try using the constraint name directly:... on conflict on constraint