Commit 003788e8 authored by Tom Lane's avatar Tom Lane

Make _outPathInfo print the relid set of the path's parent rel.

We can't actually print the parent RelOptInfo in toto, because that would
lead to infinite recursion.  But it's safe enough to reach into the parent
and print its identifying relids, and that makes it a whole lot easier
to figure out what a Path represents.  Should have done this years ago.
parent 7e8c25c6
...@@ -1352,12 +1352,15 @@ _outFromExpr(StringInfo str, FromExpr *node) ...@@ -1352,12 +1352,15 @@ _outFromExpr(StringInfo str, FromExpr *node)
/* /*
* print the basic stuff of all nodes that inherit from Path * print the basic stuff of all nodes that inherit from Path
* *
* Note we do NOT print the parent, else we'd be in infinite recursion * Note we do NOT print the parent, else we'd be in infinite recursion.
* We can print the parent's relids for identification purposes, though.
*/ */
static void static void
_outPathInfo(StringInfo str, Path *node) _outPathInfo(StringInfo str, Path *node)
{ {
WRITE_ENUM_FIELD(pathtype, NodeTag); WRITE_ENUM_FIELD(pathtype, NodeTag);
appendStringInfo(str, " :parent_relids ");
_outBitmapset(str, node->parent->relids);
WRITE_FLOAT_FIELD(startup_cost, "%.2f"); WRITE_FLOAT_FIELD(startup_cost, "%.2f");
WRITE_FLOAT_FIELD(total_cost, "%.2f"); WRITE_FLOAT_FIELD(total_cost, "%.2f");
WRITE_NODE_FIELD(pathkeys); WRITE_NODE_FIELD(pathkeys);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment