Re: [PATCH] Implement INSERT SET syntax - Mailing list pgsql-hackers

From Gareth Palmer
Subject Re: [PATCH] Implement INSERT SET syntax
Date
Msg-id D50A93EB-11F3-4ED2-8192-0328DF901BBA@internetnz.net.nz
Whole thread Raw
In response to Re: [PATCH] Implement INSERT SET syntax  (Marko Tiikkaja <marko@joh.to>)
Responses Re: [PATCH] Implement INSERT SET syntax  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
List pgsql-hackers
Hi Marko,

> On 17/07/2019, at 5:52 PM, Marko Tiikkaja <marko@joh.to> wrote:
>
> On Wed, Jul 17, 2019 at 7:30 AM Gareth Palmer <gareth@internetnz.net.nz> wrote:
> Attached is a patch that adds the option of using SET clause to specify
> the columns and values in an INSERT statement in the same manner as that
> of an UPDATE statement.
>
> Cool!  Thanks for working on this, I'd love to see the syntax in PG.
>
> There was a brief discussion regarding INSERT SET on pgsql-hackers in late
> August 2009 [1].
>
> There was also at least one slightly more recent adventure:
https://www.postgresql.org/message-id/709e06c0-59c9-ccec-d216-21e38cb5ed61%40joh.to
>
> You might want to check that thread too, in case any of the criticism there applies to this patch as well.

Thank-you for the pointer to that thread.

I think my version avoids issue raised there by doing the conversion of the SET clause as part of the INSERT grammar
rules.

Gareth


pgsql-hackers by date:

Previous
From: David Rowley
Date:
Subject: Re: Custom table AMs need to include heapam.h because of BulkInsertState
Next
From: Andres Freund
Date:
Subject: Re: Custom table AMs need to include heapam.h because ofBulkInsertState