Re: Incorrect explain output for updates/delete operations with returning-list on partitioned tables

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: Incorrect explain output for updates/delete operations with returning-list on partitioned tables
Дата
Msg-id CAApHDvoUd8RLjbvcm+wPJ_PPtB0wWbjonpN00zFsHj=oH_mr+w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Incorrect explain output for updates/delete operations with returning-list on partitioned tables  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Tue, 7 May 2024 at 09:18, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> SAIKIRAN AVULA <avulasaikiranreddy@gmail.com> writes:
> > I have been working on partitioned tables recently, and I have noticed
> > something that doesn't seem correct with the EXPLAIN output of an
> > update/delete query with a returning list.
>
> What do you think is not right exactly?  The output has to use some
> one of the correlation names for the partitioned table.  I think
> it generally chooses the one corresponding to the first Append arm,
> but really any would be good enough for EXPLAIN's purposes.

Also looks harmless to me.  But just a slight correction, you're
talking about the deparse Append condition that's in
set_deparse_plan().  Whereas the code that controls this for the
returningList is the following in nodeModifyTable.c:

/*
* Initialize result tuple slot and assign its rowtype using the first
* RETURNING list.  We assume the rest will look the same.
*/
mtstate->ps.plan->targetlist = (List *) linitial(node->returningLists);

David



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

Предыдущее
От: Thomas Munro
Дата:
Сообщение: Re: backend stuck in DataFileExtend
Следующее
От: Tom Lane
Дата:
Сообщение: WHERE CURRENT OF with RLS quals that are ctid conditions