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

From: Maxim Orlov <orlovmg(at)gmail(dot)com>
To: Suraj Kharage <suraj(dot)kharage(at)enterprisedb(dot)com>
Cc: Mario González <gonzalemario(at)gmail(dot)com>, Vaibhav Dalvi <vaibhav(dot)dalvi(at)enterprisedb(dot)com>, pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: [PATCH] Add support for INSERT ... SET syntax
Date: 2026-11-23 12:44:29
Message-ID: CACG=ezb-9JBSF-TJYSZaTx3=Y6SR94oV+tabtx3Jza_120s6uw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

I want to say right away that I like the idea behind the patch.

I ran the tests and tried to break things, but everything is still
working without issues. I also tried running it with sanitizers and
I didn't find any cases there either.

Regarding the code itself, I haven’t delved deep enough into the review
yet; I will continue looking into it.

One area I noticed is in transformInsertSetClause. This call uses nested
loops to construct lists. In a synthetic test case with a thousand
columns and many records, the patch performs significantly slower than
a standard INSERT. It might be possible to use a hash table to speed up
lookups in this scenario. On the other hand, that would also make the
code a bit more complicated.

I don’t consider this a flaw of some sort, that should hold up
development or committing the code—it’s simply a characteristic worth
being aware of.

Keep up the good work!

--
Best regards,
Maxim Orlov.

Attachment Content-Type Size
big.sql.zip application/zip 385.3 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeevan Chalke 2026-11-23 12:53:37 Re: Add PRODUCT() aggregate function
Previous Message Rajesh Kumar Thandapani 2026-11-23 12:39:34 Re: Bug in logical decoding with DDL and subtransactions