Re: A tidyup of pathkeys.c
От | Richard Guo |
---|---|
Тема | Re: A tidyup of pathkeys.c |
Дата | |
Msg-id | CAMbWs4-U66V9F-pz2zEngoLP=UHU4G7LMuFJh_kfdtoRrekB2g@mail.gmail.com обсуждение исходный текст |
Ответ на | A tidyup of pathkeys.c (David Rowley <dgrowleyml@gmail.com>) |
Ответы |
Re: A tidyup of pathkeys.c
|
Список | pgsql-hackers |
On Tue, Oct 14, 2025 at 3:03 PM David Rowley <dgrowleyml@gmail.com> wrote: > Here's a list of what I've changed: > > 1. Add count_common_leading_pathkeys_ordered() function to check for > leading common pathkeys and use that for sort_pathkeys, > window_pathkeys and window_pathkeys. > 2. Add count_common_leading_pathkeys_unordered() to check for leading > common pathkeys that exist in any portion of the other list of > pathkeys. Use this for group_pathkeys and distinct_pathkeys. > 3. Add some short-circuiting to truncate_useless_pathkeys() as there's > no point in trying to trim down the list when some other operation has > already figured out that it needs all of the pathkeys. > 4. Remove the stray " if (root->group_pathkeys != NIL) return true" > from has_useful_pathkeys(). +1. I think this is a nice tidy-up. FWIW, I complained about the stray check in has_useful_pathkeys() in [1] last week, but you were quicker than me in making the code change to remove it. [1] https://postgr.es/m/CAMbWs4_zW5QU=Zk32s17p8qWY+ga-3ZUTons+y+Wopguiopm4A@mail.gmail.com - Richard
В списке pgsql-hackers по дате отправления: