INSERT ... ON CONFLICT
Upsert via INSERT ... ON CONFLICT DO NOTHING / DO UPDATE using speculative insertion and arbiter indexes. Introduced in PostgreSQL 9.5.
Versions
- PostgreSQL 18 · worked-on · improved · moderate
Threads
- Routed ON CONFLICT inserts broken by partition-local deferrable unique constraints in 19 and master
- New isolation test insert-conflict-do-update-4 outputs rows in alternative ordering
- Issues with ON CONFLICT UPDATE and REINDEX CONCURRENTLY
- Assert when executing query on partitioned table
- change ON CONFLICT UPDATE
- weird ON CONFLICT clauses
- PATCH: pg_dump to support "on conflict do update"
- pg_dump to support "on conflict do update"
- Bug report for plpgsql
- "command cannot affect row a second time" in INSERT ... ON CONFLICT
- BUG #18587: PLPGSQL : conflict between variable and ON CONFLICT (a_column)
- a row is not inserted in nested INSERT ON CONFLICT
- BUG #18502: Upsert on view returns 42P10 error when condition is an expression
- PG12 change to DO UPDATE SET column references
- BUG #18279: Duplicate key violation and Deadlock when using ON CONFLICT/DO UPDATE with multiple unique indexes
- [PATCH] Make ON CONFLICT DO NOTHING and ON CONFLICT DO UPDATE consistent
- BUG #17800: ON CONFLICT DO UPDATE fails to detect incompatible fields that leads to a server crash
- Bug Report: INSERT ON CONFLICT sometimes does not work with partial index
- Bogus rte->relkind for EXCLUDED pseudo-relation
- Updatable Views and INSERT INTO ... ON CONFLICT
- Confusing bit in the "EXAMPLES" section for INSERT
- BUG #17558: 15beta2: Endless loop with UNIQUE NULLS NOT DISTINCT and INSERT ... ON CONFLICT
- doc: Clarify what "excluded" represents for INSERT ON CONFLICT
- BUG #17532: Prepared statements and insert on conflict can fail on the 6th execution
- Update wording of INSERT ON CONFLICT "rows proposed for insertion"
- BUG #17445: "ON CONFLICT" has different behaviors when its param is passed with prepared stmt or hard coded
- Output clause for Upsert aka INSERT...ON CONFLICT
- Possible bug report
- Bug report: variable_conflict + ON CONFLICT
- Continuing instability in insert-conflict-specconflict test
- BUG #16958: "Invalid reference to FROM-clause entry for table" when qualifying columns in "on conflict .. where"
- INSERT ... ON CONFLICT ... : expose INSERT vs UPDATE status
- BUG #16714: INSERT ON CONFLICT DO UPDATE fails to infer constraint if it's not at top-level partition
- INSERT ON CONFLICT and RETURNING
- Adding a test for speculative insert abort case
- pg_locks display of speculative locks is bogus
- Partial unique index not respected by insert on conflict statement
- BUG #15960: ON CONFLICT Trying accessing to variables
- ERROR: virtual tuple table slot does not have system attributes
- pgsql: Fix deletion of speculatively inserted TOAST on conflict
- BUG #15556: Duplicate key violations even when using ON CONFLICT DO UPDATE
- BUG #15533: error on upsert when used in a fuction and a function parameter has the same name as the column
- Problem with a "complex" upsert
- ON CONFLICT DO UPDATE for partitioned tables
- INSERT ON CONFLICT and partitioned tables