Re: machine-readable explain output - Mailing list pgsql-hackers

From Tom Lane
Subject Re: machine-readable explain output
Date
Msg-id 19299.1245175921@sss.pgh.pa.us
Whole thread Raw
In response to Re: machine-readable explain output  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: machine-readable explain output
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Jun 16, 2009 at 1:21 PM, Tom Lane<tgl@sss.pgh.pa.us> wrote:
>> As a concrete example of what I'm thinking about, I'd hope that PgAdmin
>> would be able to display a graphical summary of a plan tree, and then
>> pop up measurements associated with one of the nodes when you
>> right-click on that node.

> It seems to me that with a sufficiently powerful API, add-on modules
> could emit arbitrary stuff that might not fall into the categories
> that you've mentioned.

I don't have a problem with inventing new categories when we need to.
What I'm objecting to is using the above to justify flattening the
design completely, so that the only way to know anything about
a particular datum is to know that type of datum specifically.
There is way more structure in EXPLAIN than that, and we should
design it accordingly.

(Note that any information about rejected plans could not usefully be
attached to the plan tree anyway; it'd have to be put in some other
child of the topmost node.)

> And there could easily be other kinds of
> less invasive add-ons that would still want to emit properties that
> are formatted as text or lists rather than measurements per se.

By "measurement" I did not mean to imply "single number".  Text strings
or lists could be handled very easily, I think, especially since there
are explicit ways to represent those in XML.

The main point here is that we have a pretty good idea of what
general-purpose client code is likely to want to do with the data, and
in a lot of cases that does not translate to having to know each node
type explicitly, so long as it can be categorized.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Chuck McDevitt
Date:
Subject: Re: [PATCH] backend: compare word-at-a-time in bcTruelen
Next
From: Petr Jelinek
Date:
Subject: Re: GRANT ON ALL IN schema