Re: Improve join_search_one_level readibilty (one line change)
David Rowley <dgrowleyml@gmail.com>
From: David Rowley <dgrowleyml@gmail.com>
To: Richard Guo <guofenglinux@gmail.com>
Cc: Julien Rouhaud <rjuju123@gmail.com>, 謝東霖 <douenergy@gmail.com>, pgsql-hackers@postgresql.org
Date: 2023-08-06T09:55:18Z
Lists: pgsql-hackers
On Fri, 4 Aug 2023 at 16:05, Richard Guo <guofenglinux@gmail.com> wrote: > > > On Fri, Aug 4, 2023 at 10:36 AM David Rowley <dgrowleyml@gmail.com> wrote: >> >> The whole lnext() stuff all feels a bit old now that Lists are arrays. >> I think we'd be better adjusting the code to pass the List index where >> we start from rather than the ListCell to start from. That way we can >> use for_each_from() to iterate rather than for_each_cell(). What's >> there today feels a bit crufty and there's some element of danger that >> the given ListCell does not even belong to the given List. > > > I think we can go even further to do the same for 'bushy plans' case, > like the attached. Seems like a good idea to me. I've pushed that patch. Alex, many thanks for highlighting this and posting a patch to fix it. Congratulations on your first patch being committed. David
Commits
-
Tidy up join_search_one_level code
- 6c00d2c9d4c5 17.0 landed