| From: | Álvaro Herrera <alvherre(at)kurilemu(dot)de> |
|---|---|
| To: | Fabrízio de Royes Mello <fabriziomello(at)gmail(dot)com> |
| Cc: | Pg Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
| Subject: | Re: make ExecInsertIndexTuples arguments less bad |
| Date: | 2026-02-16 18:19:33 |
| Message-ID: | 202602161805.jwp2f4s5svmp@alvherre.pgsql |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hello Fabrízio, hackers,
On 2026-Feb-11, Fabrízio de Royes Mello wrote:
> On Wed, Feb 11, 2026 at 4:07 PM Álvaro Herrera <alvherre(at)kurilemu(dot)de> wrote:
>
> > The arguments to ExecInsertIndexTuples() are rather unhelpful to read;
> > patching them is messy and hard to follow. How about we reuse the
> > pattern we used in commit f831d4accda0 to make them less bad?
> > I think the code is much nicer to read this way.
>
> Much better. LGTM!
Thanks for looking! However, I had second thoughts about this
formulation. Mainly, the fact that one of the output arguments is part
of the macro is kinda icky. So I decided that a simpler, less
innovative option is to just use a bits32 argument to carry the input
booleans, and let the output boolean be a separate argument (which I
also moved to appear last in the argument list, as we normally do).
This also means the list of indexes continues to be its own argument.
But, as I said, this is less innovative, which I think is mostly good.
And it definitely reads better than currently.
There might be places in executor.h to reuse the f831d4accda0 thingy,
but this is probably not it.
Thanks,
--
Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/
"Los dioses no protegen a los insensatos. Éstos reciben protección de
otros insensatos mejor dotados" (Luis Wu, Mundo Anillo)
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Use-bitmask-for-ExecInsertIndexTuples-options.patch | text/x-diff | 10.1 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Alvaro Herrera | 2026-02-16 18:34:12 | Re: pgstat include expansion |
| Previous Message | Nathan Bossart | 2026-02-16 18:15:28 | Re: Speed up COPY FROM text/CSV parsing using SIMD |