* 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
{
/*
* TAGS FOR EXECUTOR NODES (execnodes.h)
*/
- T_IndexInfo = 10,
+ T_IndexInfo,
T_ExprContext,
T_ProjectionInfo,
T_JunkFilter,
/*
* TAGS FOR PLAN NODES (plannodes.h)
*/
- T_Plan = 100,
+ T_Plan,
T_Result,
T_ModifyTable,
T_Append,
*
* These should correspond one-to-one with Plan node types.
*/
- T_PlanState = 200,
+ T_PlanState,
T_ResultState,
T_ModifyTableState,
T_AppendState,
/*
* TAGS FOR PRIMITIVE NODES (primnodes.h)
*/
- T_Alias = 300,
+ T_Alias,
T_RangeVar,
T_Expr,
T_Var,
* These correspond (not always one-for-one) to primitive nodes derived
* from Expr.
*/
- T_ExprState = 400,
+ T_ExprState,
T_GenericExprState,
T_WholeRowVarExprState,
T_AggrefExprState,
/*
* TAGS FOR PLANNER NODES (relation.h)
*/
- T_PlannerInfo = 500,
+ T_PlannerInfo,
T_PlannerGlobal,
T_RelOptInfo,
T_IndexOptInfo,
/*
* 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,
/*
* TAGS FOR STATEMENT NODES (mostly in parsenodes.h)
*/
- T_Query = 700,
+ T_Query,
T_PlannedStmt,
T_InsertStmt,
T_DeleteStmt,
/*
* TAGS FOR PARSE TREE NODES (parsenodes.h)
*/
- T_A_Expr = 900,
+ T_A_Expr,
T_ColumnRef,
T_ParamRef,
T_A_Const,
* 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 */