MERGE MERGE — conditionally insert, update, or delete rows of a table Synopsis [ WITH with_query [, ...] ] MERGE …| PostgreSQL Documentation