Skip to content

Commit 286a3a6

Browse files
committed
Fix readfuncs/outfuncs problems in last night's Gather patch.
KaiGai Kohei, with one correction by me.
1 parent 5884b92 commit 286a3a6

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

src/backend/nodes/outfuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,8 @@ _outGather(StringInfo str, const Gather *node)
439439

440440
_outPlanInfo(str, (const Plan *) node);
441441

442-
WRITE_UINT_FIELD(num_workers);
443-
WRITE_UINT_FIELD(single_copy);
442+
WRITE_INT_FIELD(num_workers);
443+
WRITE_BOOL_FIELD(single_copy);
444444
}
445445

446446
static void

src/backend/nodes/readfuncs.c

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,22 @@ _readUnique(void)
19981998
READ_DONE();
19991999
}
20002000

2001+
/*
2002+
* _readGather
2003+
*/
2004+
static Gather *
2005+
_readGather(void)
2006+
{
2007+
READ_LOCALS(Gather);
2008+
2009+
ReadCommonPlan(&local_node->plan);
2010+
2011+
READ_INT_FIELD(num_workers);
2012+
READ_BOOL_FIELD(single_copy);
2013+
2014+
READ_DONE();
2015+
}
2016+
20012017
/*
20022018
* _readHash
20032019
*/
@@ -2365,6 +2381,8 @@ parseNodeString(void)
23652381
return_value = _readWindowAgg();
23662382
else if (MATCH("UNIQUE", 6))
23672383
return_value = _readUnique();
2384+
else if (MATCH("GATHER", 6))
2385+
return_value = _readGather();
23682386
else if (MATCH("HASH", 4))
23692387
return_value = _readHash();
23702388
else if (MATCH("SETOP", 5))

0 commit comments

Comments
 (0)