Обсуждение: Question about ExplainOneQuery_hook

Поиск
Список
Период
Сортировка

Question about ExplainOneQuery_hook

От
Zhihong Yu
Дата:
Hi,
I was looking at ExplainOneQuery() where ExplainOneQuery_hook is called.

Currently the call to the hook is in if block and normal processing is in else block.

What if the hook doesn't want to duplicate the whole code printing execution plan ?

Please advise.

Thanks

Re: Question about ExplainOneQuery_hook

От
"David G. Johnston"
Дата:
On Tue, Jul 26, 2022 at 1:54 PM Zhihong Yu <zyu@yugabyte.com> wrote:
Hi,
I was looking at ExplainOneQuery() where ExplainOneQuery_hook is called.

Currently the call to the hook is in if block and normal processing is in else block.

What if the hook doesn't want to duplicate the whole code printing execution plan ?

Please advise.


What kind of advice are you looking for, especially knowing we don't know anything except you find the existing hook unusable.


My advice is pretend the hook doesn't even exist since it was created 15 years ago for a specific purpose that isn't what you are doing.

I'm hoping that you already have some idea of how to interact with the open source PostgreSQL project when it doesn't have a feature that you want.  Otherwise that generic discussion probably is best done on -general with a better subject line.

David J.