Re: [HACKERS] Useless code in ExecInitModifyTable

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Useless code in ExecInitModifyTable
Дата
Msg-id 30453.1498055584@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [HACKERS] Useless code in ExecInitModifyTable  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: [HACKERS] Useless code in ExecInitModifyTable  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Amit Langote <Langote_Amit_f8@lab.ntt.co.jp> writes:
> On 2017/06/21 16:59, Etsuro Fujita wrote:
>> but I noticed that that function doesn't use the relation descriptor at
>> all.  Since partitioned_rels is given in case of an UPDATE/DELETE on a
>> partitioned table, the relation is opened in that case, but the relation
>> descriptor isn't referenced at all in initializing WITH CHECK OPTION
>> constraints and/or RETURNING projections.  (The mtstate->resultRelinfo
>> array is referenced in those initialization, instead.)  So, I'd like to
>> propose to remove this from that function.  Attached is a patch for that.

> Thanks for cleaning that up.  I cannot see any problem in applying the patch.

Actually, isn't ModifyTable.partitioned_rels *always* NIL?  I can't
see anyplace in the planner that sets it differently.  I think we should
flush the field altogether.  Anybody who doesn't want that should at least
provide the missing comment for create_modifytable_path's partitioned_rels
argument (and yes, the fact that that is missing isn't making me any
more favorably disposed...)
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Yugo Nagata
Дата:
Сообщение: Re: [HACKERS] Optional message to user when terminating/cancellingbackend
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: [HACKERS] pg_bsd_indent 2.0 is available from git.postgresql.org