From f2305d40ec20e63f781983d103d819ad2b6c0faf Mon Sep 17 00:00:00 2001 From: Robert Haas Date: Wed, 3 Feb 2016 10:38:50 -0500 Subject: [PATCH] Remove CustomPath's TextOutCustomPath method. You can't really do anything useful with this in the form it currently exists; among other problems, there's no way to reread whatever information might be produced when the path is output. Work is underway to replace this with a more useful and more general system of extensible nodes, but let's start by getting rid of this bit. Extracted from a larger patch by KaiGai Kohei. --- doc/src/sgml/custom-scan.sgml | 13 ------------- src/backend/nodes/outfuncs.c | 2 -- src/include/nodes/relation.h | 3 --- 3 files changed, 18 deletions(-) diff --git a/doc/src/sgml/custom-scan.sgml b/doc/src/sgml/custom-scan.sgml index 5bba1256d3..9a8d092dec 100644 --- a/doc/src/sgml/custom-scan.sgml +++ b/doc/src/sgml/custom-scan.sgml @@ -125,19 +125,6 @@ Plan *(*PlanCustomPath) (PlannerInfo *root, be a CustomScan object, which the callback must allocate and initialize. See for more details. - - - -void (*TextOutCustomPath) (StringInfo str, - const CustomPath *node); - - Generate additional output when nodeToString is invoked on - this custom path. This callback is optional. Since - nodeToString will automatically dump all fields in the - structure that it can see, including custom_private, this - is only useful if the CustomPath is actually embedded in a - larger struct containing additional fields. - diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index b487c002a8..d59b954654 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -1705,8 +1705,6 @@ _outCustomPath(StringInfo str, const CustomPath *node) WRITE_NODE_FIELD(custom_private); appendStringInfoString(str, " :methods "); _outToken(str, node->methods->CustomName); - if (node->methods->TextOutCustomPath) - node->methods->TextOutCustomPath(str, node); } static void diff --git a/src/include/nodes/relation.h b/src/include/nodes/relation.h index 94925984bf..595438cb24 100644 --- a/src/include/nodes/relation.h +++ b/src/include/nodes/relation.h @@ -958,9 +958,6 @@ typedef struct CustomPathMethods List *tlist, List *clauses, List *custom_plans); - /* Optional: print additional fields besides "private" */ - void (*TextOutCustomPath) (StringInfo str, - const struct CustomPath *node); } CustomPathMethods; typedef struct CustomPath -- 2.40.0