doltgresql icon indicating copy to clipboard operation
doltgresql copied to clipboard

Support `excluded` table alias in `INSERT ... ON CONFLICT`

Open fulghum opened this issue 7 months ago • 0 comments

The ON CONFLICT clause of the INSERT statement implicitly provides a table alias named excluded that represents the row proposed for insertion.

Example:

INSERT INTO distributors (did, dname)
    VALUES (5, 'Gizmo Transglobal'), (6, 'Associated Computing, Inc')
    ON CONFLICT (did) DO UPDATE SET dname = EXCLUDED.dname;

PostgreSQL Docs

Found while testing DoltHub postgres schema.

fulghum avatar Mar 06 '25 18:03 fulghum