Re: [PATCH] Add support for INSERT ... SET syntax

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add support for INSERT ... SET syntax
Date: 2026-03-30 15:06:39
Message-ID: 0238206d-81c9-4bce-acb4-127fbc4a96ac@dunslane.net
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2026-03-30 Mo 10:38 AM, David G. Johnston wrote:
> On Monday, March 30, 2026, Suraj Kharage
> <suraj(dot)kharage(at)enterprisedb(dot)com> wrote:
>
> I would like to propose adding support for an alternative INSERT
> syntax that uses named column assignments via a SET clause. This
> provides a more convenient and readable way to write inserts,
> particularly when only specific columns need values.
>
>
> -1 for inventing our own full variant of insert command syntax.

Well, Suraj has kinda beaten me to it, but he didn't invent this syntax.
Oracle did
<https://oracle-base.com/articles/23/non-positional-insert-into-set-and-insert-into-by-name-clauses-23>
and I believe there is a proposal to add it to the standard. (Unlike
Suraj's, my WIP patch also supports the INSERT BY NAME variant.)

cheers

andrew

--
Andrew Dunstan
EDB:https://www.enterprisedb.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Álvaro Herrera 2026-03-30 15:12:17 Re: Add pg_stat_autovacuum_priority
Previous Message Ants Aasma 2026-03-30 15:00:59 Re: Proposal for enabling auto-vectorization for checksum calculations