Fwd: [PATCH] Add support for INSERT ... SET syntax - Mailing list pgsql-hackers

From Triveni N
Subject Fwd: [PATCH] Add support for INSERT ... SET syntax
Date
Msg-id CAJrT2Tt32+hTEECzSmMV+fp0Xw8U=cXoQO-yCK27R35kLx6RbQ@mail.gmail.com
Whole thread
In response to Re: [PATCH] Add support for INSERT ... SET syntax  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
From: Suraj Kharage <suraj.kharage@enterprisedb.com>
Date: Mon, Apr 6, 2026 at 4:13 PM
Subject: Re: [PATCH] Add support for INSERT ... SET syntax
To: Ajay Pal <ajay.pal.k@gmail.com>
Cc: Álvaro Herrera <alvherre@kurilemu.de>, Andrew Dunstan <andrew@dunslane.net>, David G. Johnston <david.g.johnston@gmail.com>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>


Hi,

Rebased the patch with some documentation changes.
Also, added commitfest entry - https://commitfest.postgresql.org/patch/6635/

--

Thanks & Regards, 
Suraj kharage, 

Hi,

Sharing an update on testing.

Below are the areas that I’ve covered:

**Core syntax**
- Basic SET syntax (single row, with and without parentheses)
- Column order independence
- Multi-row insertion — SET (col=val, ...), (col=val, ...) syntax

**Value types**
- DEFAULT keyword and implicit defaults (column omission)
- Expressions, functions, and subqueries (including deeply nested)
- NULL values, array columns, composite types, and domain types

**Clauses & advanced features**
- RETURNING clause (single and multi-row)
- ON CONFLICT DO NOTHING / DO UPDATE
- OVERRIDING SYSTEM VALUE
- CTE (WITH clause)
- EXPLAIN / EXPLAIN ANALYZE

**Schema & constraints**
- CHECK constraints and column-level privileges
- Foreign key constraints (valid and failing cases)
- Partitioned tables, table inheritance, and schema-qualified table names
- Quoted and reserved keyword column names

**Procedural contexts**
- PL/pgSQL functions and DO blocks (including multi-row)
- Dynamic SQL via EXECUTE with parameters
- Prepared statements (PREPARE + EXECUTE)
- SAVEPOINTs and rollback behavior

**Other**
- Updatable views
- BEFORE and AFTER INSERT triggers
- Negative cases covering syntax errors, constraint violations, and privilege violations

Note: Issue reported by Ajay Pal has been resolved in v3 patch.

--
Warm regards,
Triveni
Attachment

pgsql-hackers by date:

Previous
From: Bertrand Drouvot
Date:
Subject: Re: Avoid orphaned objects dependencies, take 3
Next
From: Bertrand Drouvot
Date:
Subject: Re: Avoid orphaned objects dependencies, take 3