Re: machine-readable explain output v4

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: machine-readable explain output v4
Date: 2009-08-10 01:19:56
Message-ID: 200908100319.56863.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Monday 10 August 2009 02:53:16 Tom Lane wrote:
> Andres Freund <andres(at)anarazel(dot)de> writes:
> > On Monday 10 August 2009 01:21:35 Andrew Dunstan wrote:
> >> That ";" after the attribute is almost certainly wrong. This is a
> >> classic case of what I was talking about a month or two ago. Building up
> >> XML (or any structured doc, really, XML is not special in this regard)
> >> by ad hoc methods is horribly error prone. if you don't want to rely on
> >> libxml, then I think you need to develop a lightweight abstraction
> >> rather than just appending to a StringInfo.
> >
> > While it would be possible to add another step inbetween and generate a
> > format neutral tree and generate the different formats out of it I am not
> > sure that this is worthwile.
> > The current text format will need to stay special cased anyway because
> > its far to inconsistent to generate it from anything abstract and I don't
> > see any completely new formats coming (i.e. not just optional parts)?
>
> The patch as-submitted does have a lightweight abstraction layer of
> sorts, but the main code line feels free to ignore that and hack around
> it. I agree that we can't avoid special-casing the text output, but
> I'm trying to improve the encapsulation otherwise. What I've got at the
> moment is attached. I'd be interested in comments on the grouping
> notion in particular --- I reverse-engineered that out of what the code
> was doing, and I'm sure it could use improvement.
Adding the notion of opening a 'empty' Group together with X_OPENCLOSE or
handling of X_OPENING|X_CLOSING would allow to handle empty tags like in
ExplainOneUtility (<Notify />).

Otherwise it seems to look nice.

Andres

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2009-08-10 01:23:33 Re: Issues for named/mixed function notation patch
Previous Message Robert Haas 2009-08-10 01:16:21 Re: machine-readable explain output v4