From: | David Rowley <dgrowleyml(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | SAIKIRAN AVULA <avulasaikiranreddy(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Incorrect explain output for updates/delete operations with returning-list on partitioned tables |
Date: | 2024-05-06 22:58:15 |
Message-ID: | CAApHDvoUd8RLjbvcm+wPJ_PPtB0wWbjonpN00zFsHj=oH_mr+w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 7 May 2024 at 09:18, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> SAIKIRAN AVULA <avulasaikiranreddy(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2024-05-06 23:31:10 | WHERE CURRENT OF with RLS quals that are ctid conditions |
Previous Message | Thomas Munro | 2024-05-06 22:55:28 | Re: backend stuck in DataFileExtend |