Skip to content

Commit b4f79d2

Browse files
committed
Mark PlanState as an abstract node type.
In the same vein as commit 251154b, make it clear that we never instantiate PlanState. Also mark MemoryContextData as abstract. This has no effect right now, since memnodes.h isn't one of the files fed to gen_node_support.pl. But it seems like good documentation and future-proofing.
1 parent 2be87f0 commit b4f79d2

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

src/include/nodes/execnodes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -999,6 +999,8 @@ typedef TupleTableSlot *(*ExecProcNodeMtd) (struct PlanState *pstate);
999999
*/
10001000
typedef struct PlanState
10011001
{
1002+
pg_node_attr(abstract)
1003+
10021004
NodeTag type;
10031005

10041006
Plan *plan; /* associated Plan node */

src/include/nodes/memnodes.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ typedef struct MemoryContextMethods
7777

7878
typedef struct MemoryContextData
7979
{
80+
pg_node_attr(abstract) /* there are no nodes of this type */
81+
8082
NodeTag type; /* identifies exact kind of context */
8183
/* these two fields are placed here to minimize alignment wastage: */
8284
bool isReset; /* T = no space alloced since last reset */

src/test/modules/test_oat_hooks/test_oat_hooks.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,9 +618,6 @@ nodetag_to_string(NodeTag tag)
618618
case T_PlanInvalItem:
619619
return "PlanInvalItem";
620620
break;
621-
case T_PlanState:
622-
return "PlanState";
623-
break;
624621
case T_ResultState:
625622
return "ResultState";
626623
break;

0 commit comments

Comments
 (0)