]> granicus.if.org Git - postgresql/commit
Teach EXPLAIN to print PARAM_EXEC Params as the referenced expressions,
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 13 Jul 2010 20:57:19 +0000 (20:57 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 13 Jul 2010 20:57:19 +0000 (20:57 +0000)
commit1cc29fe7c60ba643c114979dbe588d3a38005449
tree432913ae6834cea94e9dced0dfdfab2329b0a090
parent4504a1bc017ff006c129dfce3e691f0d9b29a0c3
Teach EXPLAIN to print PARAM_EXEC Params as the referenced expressions,
rather than just $N.  This brings the display of nestloop-inner-indexscan
plans back to where it's been, and incidentally improves the display of
SubPlan parameters as well.  In passing, simplify the EXPLAIN code by
having it deal primarily in the PlanState tree rather than separately
searching Plan and PlanState trees.  This is noticeably cleaner for
subplans, and about a wash elsewhere.

One small difference from previous behavior is that EXPLAIN will no longer
qualify local variable references in inner-indexscan plan nodes, since it
no longer sees such nodes as possibly referencing multiple tables.  Vars
referenced through PARAM_EXEC Params are still forcibly qualified, though,
so I don't think the display is any more confusing than before.  Adjust a
couple of examples in the documentation to match this behavior.
doc/src/sgml/perform.sgml
doc/src/sgml/planstats.sgml
src/backend/commands/explain.c
src/backend/utils/adt/ruleutils.c
src/include/utils/builtins.h