Re: make ExecInsertIndexTuples arguments less bad
| От | Álvaro Herrera |
|---|---|
| Тема | Re: make ExecInsertIndexTuples arguments less bad |
| Дата | |
| Msg-id | 202602161805.jwp2f4s5svmp@alvherre.pgsql обсуждение исходный текст |
| Ответ на | Re: make ExecInsertIndexTuples arguments less bad (Fabrízio de Royes Mello <fabriziomello@gmail.com>) |
| Ответы |
Re: make ExecInsertIndexTuples arguments less bad
|
| Список | 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@kurilemu.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)
Вложения
В списке pgsql-hackers по дате отправления: