Re: Use outerPlanState macro instead of referring to leffttree
Richard Guo <guofenglinux@gmail.com>
From: Richard Guo <guofenglinux@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Pg Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-07-07T06:59:27Z
Lists: pgsql-hackers
Attachments
- v2-0001-Use-outerPlanState-innerPlanState-macro.patch (application/octet-stream) patch v2-0001
On Wed, Jul 6, 2022 at 10:48 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Typically, if one applies outerPlan() or outerPlanState() to the > wrong pointer, the mistake will become obvious upon even minimal > testing. My concern here is more about usages in edge cases that > perhaps escape testing, for instance in the arguments of an > elog() for some nearly-can't-happen case. Yeah, concur with that. For edge case usages maybe we can use the local-variable style to avoid wrong-pointer mistakes. Update the patch to include changes about righttree. But this doesn't include changes for edge case usages. (A rough look through shows to me that the current usages should be able to be covered by tests.) Thanks Richard
Commits
-
Remove stray references to lefttree/righttree in the executor.
- 88210542106d 16.0 landed
-
Use outerPlanState macro instead of referring to leffttree.
- 40f42d2a3432 9.5.0 cited