summaryrefslogtreecommitdiff
path: root/src/backend/nodes/outfuncs.c
diff options
context:
space:
mode:
authorTom Lane2020-11-30 21:32:56 +0000
committerTom Lane2020-11-30 21:33:09 +0000
commit8286223f3d820c39f2d5f14222f7ccde53bdf502 (patch)
treea0d6fcd77b4707780c567febb16b603fc6677e19 /src/backend/nodes/outfuncs.c
parent58ebe967f8a1e34a824d6a0a35728027272041c6 (diff)
Fix missing outfuncs.c support for IncrementalSortPath.
For debugging purposes, Path nodes are supposed to have outfuncs support, but this was overlooked in the original incremental sort patch. While at it, clean up a couple other minor oversights, as well as bizarre choice of return type for create_incremental_sort_path(). (All the existing callers just cast it to "Path *" immediately, so they don't care, but some future caller might care.) outfuncs.c fix by Zhijie Hou, the rest by me Discussion: https://postgr.es/m/324c4d81d8134117972a5b1f6cdf9560@G08CNEXMBPEKD05.g08.fujitsu.local
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r--src/backend/nodes/outfuncs.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index bd5694d88e0..b90c10e79fb 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -1955,13 +1955,29 @@ _outProjectSetPath(StringInfo str, const ProjectSetPath *node)
}
static void
+_outSortPathInfo(StringInfo str, const SortPath *node)
+{
+ _outPathInfo(str, (const Path *) node);
+
+ WRITE_NODE_FIELD(subpath);
+}
+
+static void
_outSortPath(StringInfo str, const SortPath *node)
{
WRITE_NODE_TYPE("SORTPATH");
- _outPathInfo(str, (const Path *) node);
+ _outSortPathInfo(str, node);
+}
- WRITE_NODE_FIELD(subpath);
+static void
+_outIncrementalSortPath(StringInfo str, const IncrementalSortPath *node)
+{
+ WRITE_NODE_TYPE("INCREMENTALSORTPATH");
+
+ _outSortPathInfo(str, (const SortPath *) node);
+
+ WRITE_INT_FIELD(nPresortedCols);
}
static void
@@ -4055,6 +4071,9 @@ outNode(StringInfo str, const void *obj)
case T_SortPath:
_outSortPath(str, obj);
break;
+ case T_IncrementalSortPath:
+ _outIncrementalSortPath(str, obj);
+ break;
case T_GroupPath:
_outGroupPath(str, obj);
break;