PostgreSQL 19 Adds INSERT … ON CONFLICT DO SELECT Support
PostgreSQL 19 adds INSERT ... ON CONFLICT DO SELECT to return existing rows on conflict. Dean Rasheed committed the patch on February 12, 2026. The syntax requires RETURNING and optionally accepts FOR UPDATE or FOR SHARE.
Why It MattersWhen a single statement needs to attempt an insert and read the existing row on conflict, DO SELECT works as long as the statement includes a RETURNING clause.