mirror of
				https://github.com/postgres/postgres.git
				synced 2025-11-03 09:13:20 +03:00 
			
		
		
		
	Mark PlanState as an abstract node type.
In the same vein as commit 251154beb, 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.
			
			
This commit is contained in:
		@@ -999,6 +999,8 @@ typedef TupleTableSlot *(*ExecProcNodeMtd) (struct PlanState *pstate);
 | 
				
			|||||||
 */
 | 
					 */
 | 
				
			||||||
typedef struct PlanState
 | 
					typedef struct PlanState
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						pg_node_attr(abstract)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	NodeTag		type;
 | 
						NodeTag		type;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	Plan	   *plan;			/* associated Plan node */
 | 
						Plan	   *plan;			/* associated Plan node */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -77,6 +77,8 @@ typedef struct MemoryContextMethods
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
typedef struct MemoryContextData
 | 
					typedef struct MemoryContextData
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
						pg_node_attr(abstract)		/* there are no nodes of this type */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	NodeTag		type;			/* identifies exact kind of context */
 | 
						NodeTag		type;			/* identifies exact kind of context */
 | 
				
			||||||
	/* these two fields are placed here to minimize alignment wastage: */
 | 
						/* these two fields are placed here to minimize alignment wastage: */
 | 
				
			||||||
	bool		isReset;		/* T = no space alloced since last reset */
 | 
						bool		isReset;		/* T = no space alloced since last reset */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -618,9 +618,6 @@ nodetag_to_string(NodeTag tag)
 | 
				
			|||||||
		case T_PlanInvalItem:
 | 
							case T_PlanInvalItem:
 | 
				
			||||||
			return "PlanInvalItem";
 | 
								return "PlanInvalItem";
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
		case T_PlanState:
 | 
					 | 
				
			||||||
			return "PlanState";
 | 
					 | 
				
			||||||
			break;
 | 
					 | 
				
			||||||
		case T_ResultState:
 | 
							case T_ResultState:
 | 
				
			||||||
			return "ResultState";
 | 
								return "ResultState";
 | 
				
			||||||
			break;
 | 
								break;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user