Re: refactor ExecInitPartitionInfo
Heikki Linnakangas <hlinnaka@iki.fi>
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Haibo Yan <tristan.yim@gmail.com>, jian he <jian.universality@gmail.com>
Cc: Andreas Karlsson <andreas@proxel.se>,
PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2026-07-06T11:03:11Z
Lists: pgsql-hackers
On 03/04/2026 01:19, Haibo Yan wrote:
>> On Apr 1, 2026, at 6:12 AM, jian he <jian.universality@gmail.com> wrote:
>> Ok. I switched it back to
>>
>> + if (node &&
>> + (node->withCheckOptionLists != NIL ||
>> + node->returningLists != NIL ||
>> + node->onConflictAction == ONCONFLICT_UPDATE ||
>> + node->onConflictWhere ||
>> + node->operation == CMD_MERGE))
>> + {
>> + /* later map_variable_attnos need use attribute map, build it
>> now */
>> + part_attmap = build_attrmap_by_name(RelationGetDescr(partrel),
>> +
>> RelationGetDescr(firstResultRel),
>> + false);
>> + }
>> +
>
> Hi Jian,
>
> Thanks for working on this.
>
> I’m not convinced this refactoring buys us much in its current form.
+1, for all the reasons you said. I have marked this as rejected in the
commitfest app. Thanks!
- Heikki