Обсуждение: [HACKERS] [PATCH] Make ExplainBeginGroup()/ExplainEndGroup() public.

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

[HACKERS] [PATCH] Make ExplainBeginGroup()/ExplainEndGroup() public.

От
Hadi Moshayedi
Дата:
Hello,

The attached patch moves declarations of ExplainBeginGroup()/ExplainEndGroup() from explain.c to explain.h.

This can be useful for extensions that need explain groups in their custom-scan explain output.

For example, Citus uses groups in its custom explain outputs [1]. But it achieves it by having a copy of
ExplainBeginGroup()/ExplainEndGroup() in its source code, which is not the best way.

Please review.
Thanks,
Hadi

Вложения

Re: [HACKERS] [PATCH] Make ExplainBeginGroup()/ExplainEndGroup() public.

От
Hadi Moshayedi
Дата:
Title should have been "Make ExplainOpenGroup()/ExplainCloseGroup() public.".

Sorry for the misspell.

Re: [HACKERS] [PATCH] Make ExplainBeginGroup()/ExplainEndGroup()public.

От
Kyotaro HORIGUCHI
Дата:
At Fri, 21 Jul 2017 10:09:25 -0400, Hadi Moshayedi <hadi@citusdata.com> wrote in
<CA+_kT_cCew4OKqTL-ueNndEL1jWYu+3e9RdLZP-_WR1KbONzfA@mail.gmail.com>
> Hello,
> 
> The attached patch moves declarations of
> ExplainBeginGroup()/ExplainEndGroup() from explain.c to explain.h.
> 
> This can be useful for extensions that need explain groups in their
> custom-scan explain output.
> 
> For example, Citus uses groups in its custom explain outputs [1]. But it
> achieves it by having a copy of
> ExplainBeginGroup()/ExplainEndGroup() in its source code, which is not the
> best way.
> 
> Please review.
> 
> [1]
> https://github.com/citusdata/citus/blob/master/src/backend/distributed/planner/multi_explain.c

The patch is a kind of straightforward and looks fine for me.

I think they ought to be public, like many ExplainProperty*()
functions. On the other hand this patch can cause symbol
conflicts with some external modules but I think such breakage
doesn't matter so much.

regards,

-- 
Kyotaro Horiguchi
NTT Open Source Software Center




Re: [HACKERS] [PATCH] Make ExplainBeginGroup()/ExplainEndGroup() public.

От
Robert Haas
Дата:
On Tue, Jul 25, 2017 at 9:54 PM, Kyotaro HORIGUCHI
<horiguchi.kyotaro@lab.ntt.co.jp> wrote:
> The patch is a kind of straightforward and looks fine for me.

+1 for this change.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



Re: [HACKERS] [PATCH] Make ExplainBeginGroup()/ExplainEndGroup() public.

От
Tom Lane
Дата:
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Jul 25, 2017 at 9:54 PM, Kyotaro HORIGUCHI
> <horiguchi.kyotaro@lab.ntt.co.jp> wrote:
>> The patch is a kind of straightforward and looks fine for me.

> +1 for this change.

LGTM too, pushed.
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers