Skip to content

merge

Bulk transfers between similarly structured relations

oliphant · Bulk transfers between similarly structured relations

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
102214mergeoliphant0.1ETLMITSQL

Usage

Sources:

merge is Oliphant’s table-transfer toolkit. It constructs SQL by matching columns by name and uses keys to reconcile a source relation with a destination.

Core Workflow

CREATE EXTENSION "merge";
CREATE TABLE merge_source (id integer PRIMARY KEY, label text);
CREATE TABLE merge_target (id integer PRIMARY KEY, label text);
INSERT INTO merge_source VALUES (1, 'example');
SELECT auto_insert('merge_source', 'merge_target');
SELECT * FROM merge_target;

Operational Boundaries

These are legacy pure-SQL/PLpgSQL utilities originally documented for PostgreSQL 9.x. Current-major compatibility is unverified. Installation uses the control defaults and needs administrator privileges; no shared library or preload is required. auto_insert copies shared columns, leaving destination-only columns to their defaults. auto_merge uses a writable CTE to update matching keys and insert missing rows; it is not a concurrency-safe replacement for native conflict handling. auto_delete removes destination rows absent from the source and needs deliberate scope. The caller needs read and write privileges. Validate duplicates, keys, constraints and the source selection before a bulk operation.

Table reader