Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit80f583f

Browse files
committed
Fix omission of locations in outfuncs/readfuncs partitioning node support.
We could have limped along without this for v10, which was my intentionwhen I annotated the bug in commit76a3df6. But consensus is that it'sbetter to fix it now and take the cost of a post-beta1 initdb (which isneeded because these node types are stored in pg_class.relpartbound).Since we're forcing initdb anyway, take the opportunity to make the nodetype identification strings match the node struct names, instead of beingrandomly different from them.Discussion:https://postgr.es/m/E1dFBEX-0004wt-8t@gemulon.postgresql.org
1 parentd5cb3ba commit80f583f

File tree

3 files changed

+10
-12
lines changed

3 files changed

+10
-12
lines changed

‎src/backend/nodes/outfuncs.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3530,7 +3530,7 @@ _outPartitionElem(StringInfo str, const PartitionElem *node)
35303530
staticvoid
35313531
_outPartitionSpec(StringInfostr,constPartitionSpec*node)
35323532
{
3533-
WRITE_NODE_TYPE("PARTITIONBY");
3533+
WRITE_NODE_TYPE("PARTITIONSPEC");
35343534

35353535
WRITE_STRING_FIELD(strategy);
35363536
WRITE_NODE_FIELD(partParams);
@@ -3540,23 +3540,23 @@ _outPartitionSpec(StringInfo str, const PartitionSpec *node)
35403540
staticvoid
35413541
_outPartitionBoundSpec(StringInfostr,constPartitionBoundSpec*node)
35423542
{
3543-
WRITE_NODE_TYPE("PARTITIONBOUND");
3543+
WRITE_NODE_TYPE("PARTITIONBOUNDSPEC");
35443544

35453545
WRITE_CHAR_FIELD(strategy);
35463546
WRITE_NODE_FIELD(listdatums);
35473547
WRITE_NODE_FIELD(lowerdatums);
35483548
WRITE_NODE_FIELD(upperdatums);
3549-
/* XXX somebody forgotlocation field; too late to change for v10 */
3549+
WRITE_LOCATION_FIELD(location);
35503550
}
35513551

35523552
staticvoid
35533553
_outPartitionRangeDatum(StringInfostr,constPartitionRangeDatum*node)
35543554
{
3555-
WRITE_NODE_TYPE("PARTRANGEDATUM");
3555+
WRITE_NODE_TYPE("PARTITIONRANGEDATUM");
35563556

35573557
WRITE_BOOL_FIELD(infinite);
35583558
WRITE_NODE_FIELD(value);
3559-
/* XXX somebody forgotlocation field; too late to change for v10 */
3559+
WRITE_LOCATION_FIELD(location);
35603560
}
35613561

35623562
/*

‎src/backend/nodes/readfuncs.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,8 +2376,7 @@ _readPartitionBoundSpec(void)
23762376
READ_NODE_FIELD(listdatums);
23772377
READ_NODE_FIELD(lowerdatums);
23782378
READ_NODE_FIELD(upperdatums);
2379-
/* XXX somebody forgot location field; too late to change for v10 */
2380-
local_node->location=-1;
2379+
READ_LOCATION_FIELD(location);
23812380

23822381
READ_DONE();
23832382
}
@@ -2392,8 +2391,7 @@ _readPartitionRangeDatum(void)
23922391

23932392
READ_BOOL_FIELD(infinite);
23942393
READ_NODE_FIELD(value);
2395-
/* XXX somebody forgot location field; too late to change for v10 */
2396-
local_node->location=-1;
2394+
READ_LOCATION_FIELD(location);
23972395

23982396
READ_DONE();
23992397
}
@@ -2638,9 +2636,9 @@ parseNodeString(void)
26382636
return_value=_readAlternativeSubPlan();
26392637
elseif (MATCH("EXTENSIBLENODE",14))
26402638
return_value=_readExtensibleNode();
2641-
elseif (MATCH("PARTITIONBOUND",14))
2639+
elseif (MATCH("PARTITIONBOUNDSPEC",18))
26422640
return_value=_readPartitionBoundSpec();
2643-
elseif (MATCH("PARTRANGEDATUM",14))
2641+
elseif (MATCH("PARTITIONRANGEDATUM",19))
26442642
return_value=_readPartitionRangeDatum();
26452643
else
26462644
{

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO201705141
56+
#defineCATALOG_VERSION_NO201705301
5757

5858
#endif

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp