Re: Wired if-statement in gen_partprune_steps_internal

Поиск
Список
Период
Сортировка
Искать
От
David Rowley
Тема
Re: Wired if-statement in gen_partprune_steps_internal
Дата
Msg-id
CAApHDvp=4GpbPVJuFnx-5p8e2BU_9P6yTA2p3Cg78RD6tJs6GQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Wired if-statement in gen_partprune_steps_internal Andy Fan <zhihui.fan1213@gmail.com>
Re: Wired if-statement in gen_partprune_steps_internal Amit Langote <amitlangote09@gmail.com>
Re: Wired if-statement in gen_partprune_steps_internal Andy Fan <zhihui.fan1213@gmail.com>
Re: Wired if-statement in gen_partprune_steps_internal Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Re: Wired if-statement in gen_partprune_steps_internal Andy Fan <zhihui.fan1213@gmail.com>
Re: Wired if-statement in gen_partprune_steps_internal Amit Langote <amitlangote09@gmail.com>
On Wed, 7 Apr 2021 at 21:53, David Rowley  wrote:
> If canonicalize_qual() had been unable to rewrite that WHERE clause
> then I could see that we might want to combine steps from other
> recursive quals. I'm thinking right now that I'm glad
> canonicalize_qual() does that hard work for us.  (I think partprune.c
> could handle the original WHERE clause as-is in this example
> anyway...)

I made a pass over the v2 patch and since it's been a long time since
I'd looked at partprune.c I ended doing further rewriting of the
comments you'd changed.

There's only one small code change as I didn't like the following:

- return result;
+ /* A single step or no pruning possible with the provided clauses. */
+ return steps ? linitial(steps) : NULL;

I ended up breaking that out into an if condition.

All the other changes are around the comments.

Can you look over this and let me know if you're happy with the changes?

David
В списке pgsql-hackers по дате отправления
От: Andrey Borodin
Дата:
От: Andrew Dunstan
Дата:
FAQ