Re: implement EXPLAIN EXECUTE - Mailing list pgsql-patches

From Tom Lane
Subject Re: implement EXPLAIN EXECUTE
Date
Msg-id 4077.1042399879@sss.pgh.pa.us
Whole thread Raw
In response to implement EXPLAIN EXECUTE  (Neil Conway <neilc@samurai.com>)
Responses Re: implement EXPLAIN EXECUTE
List pgsql-patches
Neil Conway <neilc@samurai.com> writes:
> This patch implements EXPLAIN EXECUTE, including documentation updates.

This seems like quite a messy way to do things.  Why not just make the
grammar

ExplainStmt:
            EXPLAIN opt_analyze opt_verbose OptimizableStmt
          | EXPLAIN opt_analyze opt_verbose ExecuteStmt

where ExplainStmt.query can point to either an optimizable statement
or an 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.

            regards, tom lane

pgsql-patches by date:

Previous
From: Neil Conway
Date:
Subject: Re: pg_dump a specific schema
Next
From: Joe Conway
Date:
Subject: targetlist functions part 1 (was [HACKERS] targetlist functions proposals)