Re: Rationalizing EXPLAIN VERBOSE output - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Rationalizing EXPLAIN VERBOSE output
Date
Msg-id 9916.1015820819@sss.pgh.pa.us
Whole thread Raw
In response to Re: Rationalizing EXPLAIN VERBOSE output  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Tom Lane writes:
>> The other possibility is to make EXPLAIN output look like a SELECT
>> result.  Not sure how hard this would be to do, but in the long run
>> I suppose that would be the direction to move in.

> You could internally rewrite it to something like
> select explain('select * from pg_class;');

Having looked, I think it wouldn't be that bad to call the regular
printtup.c routines directly.  Assuming that the output model we
want is "one text column, with one row per line", it'd only be
necessary to fake up a correct TupleDesc and then form a HeapTuple
from each line of output.  Lots less work than trying to rewrite
the query, I think.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Rationalizing EXPLAIN VERBOSE output
Next
From: Bruce Momjian
Date:
Subject: Re: Rationalizing EXPLAIN VERBOSE output