aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/outfuncs.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-05-30 11:32:41 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-05-30 11:32:41 -0400
commit80f583ffe930b21d6e5c47be4342356e57851a9a (patch)
tree24aee8599f3177fba4bb50a6ec18a7cea3c77b77 /src/backend/nodes/outfuncs.c
parentd5cb3bab564e0927ffac7c8729eacf181a12dd40 (diff)
downloadpostgresql-80f583ffe930b21d6e5c47be4342356e57851a9a.tar.gz
postgresql-80f583ffe930b21d6e5c47be4342356e57851a9a.zip
Fix omission of locations in outfuncs/readfuncs partitioning node support.
We could have limped along without this for v10, which was my intention when I annotated the bug in commit 76a3df6e5. But consensus is that it's better to fix it now and take the cost of a post-beta1 initdb (which is needed because these node types are stored in pg_class.relpartbound). Since we're forcing initdb anyway, take the opportunity to make the node type identification strings match the node struct names, instead of being randomly different from them. Discussion: https://postgr.es/m/E1dFBEX-0004wt-8t@gemulon.postgresql.org
Diffstat (limited to 'src/backend/nodes/outfuncs.c')
-rw-r--r--src/backend/nodes/outfuncs.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c
index 9189c8d43f8..c348bdcde39 100644
--- a/src/backend/nodes/outfuncs.c
+++ b/src/backend/nodes/outfuncs.c
@@ -3530,7 +3530,7 @@ _outPartitionElem(StringInfo str, const PartitionElem *node)
static void
_outPartitionSpec(StringInfo str, const PartitionSpec *node)
{
- WRITE_NODE_TYPE("PARTITIONBY");
+ WRITE_NODE_TYPE("PARTITIONSPEC");
WRITE_STRING_FIELD(strategy);
WRITE_NODE_FIELD(partParams);
@@ -3540,23 +3540,23 @@ _outPartitionSpec(StringInfo str, const PartitionSpec *node)
static void
_outPartitionBoundSpec(StringInfo str, const PartitionBoundSpec *node)
{
- WRITE_NODE_TYPE("PARTITIONBOUND");
+ WRITE_NODE_TYPE("PARTITIONBOUNDSPEC");
WRITE_CHAR_FIELD(strategy);
WRITE_NODE_FIELD(listdatums);
WRITE_NODE_FIELD(lowerdatums);
WRITE_NODE_FIELD(upperdatums);
- /* XXX somebody forgot location field; too late to change for v10 */
+ WRITE_LOCATION_FIELD(location);
}
static void
_outPartitionRangeDatum(StringInfo str, const PartitionRangeDatum *node)
{
- WRITE_NODE_TYPE("PARTRANGEDATUM");
+ WRITE_NODE_TYPE("PARTITIONRANGEDATUM");
WRITE_BOOL_FIELD(infinite);
WRITE_NODE_FIELD(value);
- /* XXX somebody forgot location field; too late to change for v10 */
+ WRITE_LOCATION_FIELD(location);
}
/*