aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2010-09-23 15:16:49 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2010-09-23 15:16:49 -0400
commit003788e81e7f72bc545b509e1517a672d891273b (patch)
treee4885ca616652a579370521b9e4d7b93e3fd269d /src
parent7e8c25c66e9837d5dafeb2b3a0786611226af269 (diff)
downloadpostgresql-003788e81e7f72bc545b509e1517a672d891273b.tar.gz
postgresql-003788e81e7f72bc545b509e1517a672d891273b.zip
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.
Diffstat (limited to 'src')
-rw-r--r--src/backend/nodes/outfuncs.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index e62fe818821..3b30d4f81c0 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -1352,12 +1352,15 @@ _outFromExpr(StringInfo str, FromExpr *node)
/*
* 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
_outPathInfo(StringInfo str, Path *node)
{
WRITE_ENUM_FIELD(pathtype, NodeTag);
+ appendStringInfo(str, " :parent_relids ");
+ _outBitmapset(str, node->parent->relids);
WRITE_FLOAT_FIELD(startup_cost, "%.2f");
WRITE_FLOAT_FIELD(total_cost, "%.2f");
WRITE_NODE_FIELD(pathkeys);