Re: bug: json format and auto_explain

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: bug: json format and auto_explain
Дата
Msg-id 5029.1260202063@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: bug: json format and auto_explain  (Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp>)
Ответы Re: bug: json format and auto_explain  (Robert Haas <robertmhaas@gmail.com>)
Список pgsql-hackers
Itagaki Takahiro <itagaki.takahiro@oss.ntt.co.jp> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Looks like auto_explain is under the illusion that it need not call
>> ExplainBeginOutput/ExplainEndOutput.

> Explain{Begin/End}Output are static functions, so we cannot call them
> from an external contrib module. Instead, I'll suggest to call them
> automatically from ExplainPrintPlan. The original codes in ExplainPrintPlan
> was moved into ExplainOneResult, that name might be debatable.

This isn't an adequate solution I'm afraid --- what about the other
functions that are exported by explain.h?

I too am not totally thrilled with the idea of exporting
Explain{Begin/End}Output, but it might be the best solution.
We might also need to think about refactoring those functions:
there seem to be two different things going on there, one being
format-specific initialization which will certainly be necessary,
and one being output of a wrapper structure which might or might
not be appropriate for what auto_explain or other callers want.

In any case you need to expend more effort on the comments for the
functions.  Inadequate specification of ExplainPrintPlan's call
requirements is what got us into this problem in the first place,
and the proposed patch makes that worse not better.
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Euler Taveira de Oliveira
Дата:
Сообщение: Re: bug: json format and auto_explain
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Adding support for SE-Linux security