Skip to content

Commit 251154b

Browse files
committed
Remove T_Join and T_Plan
These are abstract node types that don't need to have a node tag defined. Discussion: https://www.postgresql.org/message-id/2592455.1657140387%40sss.pgh.pa.us
1 parent 3de359f commit 251154b

File tree

6 files changed

+1
-102
lines changed

6 files changed

+1
-102
lines changed

src/backend/nodes/copyfuncs.c

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -138,23 +138,6 @@ CopyPlanFields(const Plan *from, Plan *newnode)
138138
COPY_BITMAPSET_FIELD(allParam);
139139
}
140140

141-
/*
142-
* _copyPlan
143-
*/
144-
static Plan *
145-
_copyPlan(const Plan *from)
146-
{
147-
Plan *newnode = makeNode(Plan);
148-
149-
/*
150-
* copy node superclass fields
151-
*/
152-
CopyPlanFields(from, newnode);
153-
154-
return newnode;
155-
}
156-
157-
158141
/*
159142
* _copyResult
160143
*/
@@ -844,23 +827,6 @@ CopyJoinFields(const Join *from, Join *newnode)
844827
}
845828

846829

847-
/*
848-
* _copyJoin
849-
*/
850-
static Join *
851-
_copyJoin(const Join *from)
852-
{
853-
Join *newnode = makeNode(Join);
854-
855-
/*
856-
* copy node superclass fields
857-
*/
858-
CopyJoinFields(from, newnode);
859-
860-
return newnode;
861-
}
862-
863-
864830
/*
865831
* _copyNestLoop
866832
*/
@@ -5571,9 +5537,6 @@ copyObjectImpl(const void *from)
55715537
case T_PlannedStmt:
55725538
retval = _copyPlannedStmt(from);
55735539
break;
5574-
case T_Plan:
5575-
retval = _copyPlan(from);
5576-
break;
55775540
case T_Result:
55785541
retval = _copyResult(from);
55795542
break;
@@ -5658,9 +5621,6 @@ copyObjectImpl(const void *from)
56585621
case T_CustomScan:
56595622
retval = _copyCustomScan(from);
56605623
break;
5661-
case T_Join:
5662-
retval = _copyJoin(from);
5663-
break;
56645624
case T_NestLoop:
56655625
retval = _copyNestLoop(from);
56665626
break;

src/backend/nodes/outfuncs.c

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -386,15 +386,6 @@ _outJoinPlanInfo(StringInfo str, const Join *node)
386386
WRITE_NODE_FIELD(joinqual);
387387
}
388388

389-
390-
static void
391-
_outPlan(StringInfo str, const Plan *node)
392-
{
393-
WRITE_NODE_TYPE("PLAN");
394-
395-
_outPlanInfo(str, (const Plan *) node);
396-
}
397-
398389
static void
399390
_outResult(StringInfo str, const Result *node)
400391
{
@@ -750,14 +741,6 @@ _outCustomScan(StringInfo str, const CustomScan *node)
750741
outToken(str, node->methods->CustomName);
751742
}
752743

753-
static void
754-
_outJoin(StringInfo str, const Join *node)
755-
{
756-
WRITE_NODE_TYPE("JOIN");
757-
758-
_outJoinPlanInfo(str, (const Join *) node);
759-
}
760-
761744
static void
762745
_outNestLoop(StringInfo str, const NestLoop *node)
763746
{
@@ -4058,9 +4041,6 @@ outNode(StringInfo str, const void *obj)
40584041
case T_PlannedStmt:
40594042
_outPlannedStmt(str, obj);
40604043
break;
4061-
case T_Plan:
4062-
_outPlan(str, obj);
4063-
break;
40644044
case T_Result:
40654045
_outResult(str, obj);
40664046
break;
@@ -4145,9 +4125,6 @@ outNode(StringInfo str, const void *obj)
41454125
case T_CustomScan:
41464126
_outCustomScan(str, obj);
41474127
break;
4148-
case T_Join:
4149-
_outJoin(str, obj);
4150-
break;
41514128
case T_NestLoop:
41524129
_outNestLoop(str, obj);
41534130
break;

src/backend/nodes/readfuncs.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1859,19 +1859,6 @@ ReadCommonPlan(Plan *local_node)
18591859
READ_BITMAPSET_FIELD(allParam);
18601860
}
18611861

1862-
/*
1863-
* _readPlan
1864-
*/
1865-
static Plan *
1866-
_readPlan(void)
1867-
{
1868-
READ_LOCALS_NO_FIELDS(Plan);
1869-
1870-
ReadCommonPlan(local_node);
1871-
1872-
READ_DONE();
1873-
}
1874-
18751862
/*
18761863
* _readResult
18771864
*/
@@ -2362,19 +2349,6 @@ ReadCommonJoin(Join *local_node)
23622349
READ_NODE_FIELD(joinqual);
23632350
}
23642351

2365-
/*
2366-
* _readJoin
2367-
*/
2368-
static Join *
2369-
_readJoin(void)
2370-
{
2371-
READ_LOCALS_NO_FIELDS(Join);
2372-
2373-
ReadCommonJoin(local_node);
2374-
2375-
READ_DONE();
2376-
}
2377-
23782352
/*
23792353
* _readNestLoop
23802354
*/
@@ -3099,8 +3073,6 @@ parseNodeString(void)
30993073
return_value = _readDeclareCursorStmt();
31003074
else if (MATCH("PLANNEDSTMT", 11))
31013075
return_value = _readPlannedStmt();
3102-
else if (MATCH("PLAN", 4))
3103-
return_value = _readPlan();
31043076
else if (MATCH("RESULT", 6))
31053077
return_value = _readResult();
31063078
else if (MATCH("PROJECTSET", 10))
@@ -3153,8 +3125,6 @@ parseNodeString(void)
31533125
return_value = _readForeignScan();
31543126
else if (MATCH("CUSTOMSCAN", 10))
31553127
return_value = _readCustomScan();
3156-
else if (MATCH("JOIN", 4))
3157-
return_value = _readJoin();
31583128
else if (MATCH("NESTLOOP", 8))
31593129
return_value = _readNestLoop();
31603130
else if (MATCH("MERGEJOIN", 9))

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-
#define CATALOG_VERSION_NO 202207052
56+
#define CATALOG_VERSION_NO 202207081
5757

5858
#endif

src/include/nodes/nodes.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ typedef enum NodeTag
4343
/*
4444
* TAGS FOR PLAN NODES (plannodes.h)
4545
*/
46-
T_Plan,
4746
T_Result,
4847
T_ProjectSet,
4948
T_ModifyTable,
@@ -70,7 +69,6 @@ typedef enum NodeTag
7069
T_WorkTableScan,
7170
T_ForeignScan,
7271
T_CustomScan,
73-
T_Join,
7472
T_NestLoop,
7573
T_MergeJoin,
7674
T_HashJoin,

src/test/modules/test_oat_hooks/test_oat_hooks.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -468,9 +468,6 @@ nodetag_to_string(NodeTag tag)
468468
case T_TupleTableSlot:
469469
return "TupleTableSlot";
470470
break;
471-
case T_Plan:
472-
return "Plan";
473-
break;
474471
case T_Result:
475472
return "Result";
476473
break;
@@ -549,9 +546,6 @@ nodetag_to_string(NodeTag tag)
549546
case T_CustomScan:
550547
return "CustomScan";
551548
break;
552-
case T_Join:
553-
return "Join";
554-
break;
555549
case T_NestLoop:
556550
return "NestLoop";
557551
break;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy