Re: implement EXPLAIN EXECUTE - Mailing list pgsql-patches

From Neil Conway
Subject Re: implement EXPLAIN EXECUTE
Date
Msg-id 1042651604.368.58.camel@tokyo
Whole thread Raw
In response to Re: implement EXPLAIN EXECUTE  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: implement EXPLAIN EXECUTE
List pgsql-patches
On Sun, 2003-01-12 at 14:31, Tom Lane wrote:
> ExplainStmt:
>             EXPLAIN opt_analyze opt_verbose OptimizableStmt
>           | EXPLAIN opt_analyze opt_verbose ExecuteStmt

> Then you'd not need one single change (I think) in parsenodes.h nor
> analyze.c, nor need to expose subroutines of explain.c to outside.
> Instead, prepare.c would have to expose a function to fetch the plan
> tree for a prepared query, but that seems a reasonable thing to do.

I thought about that (and even partially implemented it), but I decided
against it: when you take into account the need to accept & evaluate
parameters (or else EXPLAIN ANALYZE isn't much use on a prepared query),
you need to modify analyze.c anyway, and I wasn't that comfortable
teaching explain.c a lot about the inner workings of prepare.c

I think my implementation isn't too messy, anyway -- the majority of the
changes are just refactoring the existing code into smaller functions,
so that it can be reused more easily (which is probably a good idea
anyway, IMHO).

However, if you'd prefer I can redo the implementation as you suggested.
Let me know...

Cheers,

Neil
--
Neil Conway <neilc@samurai.com> || PGP Key ID: DB3C29FC




pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: minor improvement to contrib/fulltextindex docs
Next
From: Bruce Momjian
Date:
Subject: Re: pg_get_constraintdef patch #2