~/talk

The MERGE Command

Talkat PGConf NYC 2022 · 2022-09-22..09-23· [databases]
slides:none on file

Postgres 15 adds a working MERGE that applies INSERT/UPDATE/DELETE from a source to a target per the SQL standard; it decides match status once (so concurrency differs from INSERT ... ON CONFLICT) and can raise duplicate-key or tuple-locked errors, rolling back the whole statement. MERGE supports joins, partitioning, triggers and transition tables, is atomic and optimized for both OLTP and large batches, but currently has no RETURNING, no updatable/materialized/foreign target, no WITH RECURSIVE, and executes row-by-row.

AI-written summary · about

  1. 0:00Introduction and background
  2. 1:33SQL standard and MERGE history
  3. 6:13MERGE command development
  4. 8:46MERGE syntax and basics
  5. 11:55Execution and optimization details
  6. 26:53Comparison with INSERT ON CONFLICT
  7. 33:04Privileges and triggers
  8. 36:59Q&A session
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.