Re: explain root element for auto-explain

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(dot)dunstan(at)pgexperts(dot)com>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: explain root element for auto-explain
Date: 2009-08-17 22:55:52
Message-ID: 24282.1250549752@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(dot)dunstan(at)pgexperts(dot)com> writes:
> The attached tiny patch sets the <explain> root element for auto-explain
> XML output, so it looks something like this:

This looks reasonable in itself, but it sort of begs the question on
two other things:

* what's the xmlns URL really going to be?

* what's the <Query> element in regular XML output good for? And
shouldn't we make both explain and auto-explain either have that or not?

> The JSON output looks like this:

> [
> "Plan": {
> "Node Type": "Result",
> "Startup Cost": 0.00,
> "Total Cost": 0.01,
> "Plan Rows": 1,
> "Plan Width": 0
> }
> ]

<squint> Bearing in mind that I know roughly nothing of JSON ... surely
the above is syntactically incorrect? A labeled value should be within
{...} not [...]. I think this is closely related to the point about
<Query>, ie the same semantic nesting level is missing in both cases.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jan Otto 2009-08-17 23:00:51 Re: drop tablespace error: invalid argument
Previous Message Michael Clark 2009-08-17 22:28:21 PQgetlength vs. octet_length()