diff --git a/src/include/nodes/nodes.h b/src/include/nodes/nodes.h index c514d3fc93e88c2a098d4eab4ef5737bbc120852..201f2487743afc1fae7bbf9d15dc7f93bef7d1a0 100644 --- a/src/include/nodes/nodes.h +++ b/src/include/nodes/nodes.h @@ -18,10 +18,10 @@ * The first field of every node is NodeTag. Each node created (with makeNode) * will have one of the following tags as the value of its first field. * - * Note that the numbers of the node tags are not contiguous. We left holes - * here so that we can add more tags without changing the existing enum's. - * (Since node tag numbers never exist outside backend memory, there's no - * real harm in renumbering, it just costs a full rebuild ...) + * Note that inserting or deleting node types changes the numbers of other + * node types later in the list. This is no problem during development, since + * the node numbers are never stored on disk. But don't do it in a released + * branch, because that would represent an ABI break for extensions. */ typedef enum NodeTag { @@ -30,7 +30,7 @@ typedef enum NodeTag /* * TAGS FOR EXECUTOR NODES (execnodes.h) */ - T_IndexInfo = 10, + T_IndexInfo, T_ExprContext, T_ProjectionInfo, T_JunkFilter, @@ -41,7 +41,7 @@ typedef enum NodeTag /* * TAGS FOR PLAN NODES (plannodes.h) */ - T_Plan = 100, + T_Plan, T_Result, T_ModifyTable, T_Append, @@ -89,7 +89,7 @@ typedef enum NodeTag * * These should correspond one-to-one with Plan node types. */ - T_PlanState = 200, + T_PlanState, T_ResultState, T_ModifyTableState, T_AppendState, @@ -131,7 +131,7 @@ typedef enum NodeTag /* * TAGS FOR PRIMITIVE NODES (primnodes.h) */ - T_Alias = 300, + T_Alias, T_RangeVar, T_Expr, T_Var, @@ -188,7 +188,7 @@ typedef enum NodeTag * These correspond (not always one-for-one) to primitive nodes derived * from Expr. */ - T_ExprState = 400, + T_ExprState, T_GenericExprState, T_WholeRowVarExprState, T_AggrefExprState, @@ -220,7 +220,7 @@ typedef enum NodeTag /* * TAGS FOR PLANNER NODES (relation.h) */ - T_PlannerInfo = 500, + T_PlannerInfo, T_PlannerGlobal, T_RelOptInfo, T_IndexOptInfo, @@ -273,13 +273,13 @@ typedef enum NodeTag /* * TAGS FOR MEMORY NODES (memnodes.h) */ - T_MemoryContext = 600, + T_MemoryContext, T_AllocSetContext, /* * TAGS FOR VALUE NODES (value.h) */ - T_Value = 650, + T_Value, T_Integer, T_Float, T_String, @@ -301,7 +301,7 @@ typedef enum NodeTag /* * TAGS FOR STATEMENT NODES (mostly in parsenodes.h) */ - T_Query = 700, + T_Query, T_PlannedStmt, T_InsertStmt, T_DeleteStmt, @@ -411,7 +411,7 @@ typedef enum NodeTag /* * TAGS FOR PARSE TREE NODES (parsenodes.h) */ - T_A_Expr = 900, + T_A_Expr, T_ColumnRef, T_ParamRef, T_A_Const, @@ -478,7 +478,7 @@ typedef enum NodeTag * purposes (usually because they are involved in APIs where we want to * pass multiple object types through the same pointer). */ - T_TriggerData = 950, /* in commands/trigger.h */ + T_TriggerData, /* in commands/trigger.h */ T_EventTriggerData, /* in commands/event_trigger.h */ T_ReturnSetInfo, /* in nodes/execnodes.h */ T_WindowObjectData, /* private in nodeWindowAgg.c */