Re: machine-readable explain output v4

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Andres Freund <andres(at)anarazel(dot)de>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: machine-readable explain output v4
Date: 2009-08-07 01:56:20
Message-ID: 603c8f070908061856h546556f5iad648410d1d34e0c@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 5, 2009 at 10:48 PM, Robert Haas<robertmhaas(at)gmail(dot)com> wrote:
> On Sun, Aug 2, 2009 at 7:29 PM, Andres Freund<andres(at)anarazel(dot)de> wrote:
>>> Well, the whole explain output format is pretty idiosyncratic, and I
>>> had to work pretty hard to beat it into submission.  I think that it
>>> would not be totally trivial to do what you're suggesting here because
>>> it would require adding code to manage es->indent outside of
>>> ExplainPrintPlan(), which we currently don't.  I'm not sure whether
>>> that works out to a net win.
>> Thats why I suggested doing it for JSON/XML only. E.g. like in the attached
>> patch. The result looks simpler for my eyes.
>
> I looked at this some more.  I think it's a mess.  It's probably right
> to do what you're suggesting here, but this patch only changes pieces
> of it without making the whole thing consistent.  report_triggers(),
> for example, kludges a value into es->indent but then ignores it when
> determining how much to indent <Trigger>, etc.  I can't even figure
> out why this works now, let alone being able to maintain it down the
> line.
>
> I'm working on trying to fix this.

Revised patch attached. I'm not convinced this is as good as it can
be, but I've been looking at this patch for so long that I'm starting
to get cross-eyed, and I'd like to Tom at least have a look at this
and assess it before we run out of CommitFest.

...Robert

Attachment Content-Type Size
explain_format-v5.patch text/x-diff 73.5 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-08-07 02:12:18 Re: mixed, named notation support
Previous Message Itagaki Takahiro 2009-08-07 01:31:51 pg_ctl stop -m fast after -m smart