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

From: Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>
To: hadi(at)citusdata(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] Make ExplainBeginGroup()/ExplainEndGroup() public.
Date: 2017-07-26 01:54:24
Message-ID: 20170726.105424.260431886.horiguchi.kyotaro@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

At Fri, 21 Jul 2017 10:09:25 -0400, Hadi Moshayedi <hadi(at)citusdata(dot)com> wrote in <CA+_kT_cCew4OKqTL-ueNndEL1jWYu+3e9RdLZP-_WR1KbONzfA(at)mail(dot)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2017-07-26 02:18:05 Re: pg_dump does not handle indirectly-granted permissions properly
Previous Message Andres Freund 2017-07-26 01:26:41 Re: segfault in HEAD when too many nested functions call