Thread
-
Re: Fix bug of UPDATE/DELETE FOR PORTION OF with inheritance tables
Paul A Jungwirth <pj@illuminatedcomputing.com> — 2026-05-27T01:28:51Z
On Tue, May 26, 2026 at 9:14 AM Paul A Jungwirth <pj@illuminatedcomputing.com> wrote: > > I thought the ExecInitForPortionOf refactoring was still nice to keep, > and it seemed to fit better here. (I should have updated the commit > message not to mention UPDATE OF though.) I looked at the original v1 patch again. I thought the commit message was excellent, so I pulled that into the latest patch, also some comment changes and the partitionRouting boolean and some test double-checks. I still like how ExecInitForPortionOf cuts down on the branchiness and the variables used to track attnums, and also how it gathers a lot of the child table setup in one place. The v1 seemed hard to trace all the cases from top to bottom. For instance it initialized map for all child tables, but then only used it for partitions. > But thinking about it this morning, I realized: the planner already > prunes partitions before we get here. Lazily initializing the structs > is trying too hard. Is there some scenario where that actually saves > work? Never mind, of course you can filter rows (and whole tables) besides just by partition pruning/constraint exclusion. I'm not sure whom to list as author/co-author/reviewer for this patch, but I took a stab at it. I think most of the current code is from jian he's version, but all three of us have contributed a lot by this point. Yours, -- Paul ~{:-) pj@illuminatedcomputing.com