* Definitions for tagged nodes.
*
*
- * Portions Copyright (c) 1996-2011, PostgreSQL Global Development Group
+ * Portions Copyright (c) 1996-2015, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/nodes/nodes.h
T_Scan,
T_SeqScan,
T_IndexScan,
+ T_IndexOnlyScan,
T_BitmapIndexScan,
T_BitmapHeapScan,
T_TidScan,
T_ValuesScan,
T_CteScan,
T_WorkTableScan,
+ T_SampleScan,
+ T_ForeignScan,
+ T_CustomScan,
T_Join,
T_NestLoop,
T_MergeJoin,
T_BitmapOrState,
T_ScanState,
T_SeqScanState,
+ T_SampleScanState,
T_IndexScanState,
+ T_IndexOnlyScanState,
T_BitmapIndexScanState,
T_BitmapHeapScanState,
T_TidScanState,
T_ValuesScanState,
T_CteScanState,
T_WorkTableScanState,
+ T_ForeignScanState,
+ T_CustomScanState,
T_JoinState,
T_NestLoopState,
T_MergeJoinState,
T_Const,
T_Param,
T_Aggref,
+ T_GroupingFunc,
T_WindowFunc,
T_ArrayRef,
T_FuncExpr,
T_NamedArgExpr,
T_OpExpr,
T_DistinctExpr,
+ T_NullIfExpr,
T_ScalarArrayOpExpr,
T_BoolExpr,
T_SubLink,
T_CoerceViaIO,
T_ArrayCoerceExpr,
T_ConvertRowtypeExpr,
+ T_CollateExpr,
T_CaseExpr,
T_CaseWhen,
T_CaseTestExpr,
T_CoalesceExpr,
T_MinMaxExpr,
T_XmlExpr,
- T_NullIfExpr,
T_NullTest,
T_BooleanTest,
T_CoerceToDomain,
T_CoerceToDomainValue,
T_SetToDefault,
T_CurrentOfExpr,
+ T_InferenceElem,
T_TargetEntry,
T_RangeTblRef,
T_JoinExpr,
T_FromExpr,
+ T_OnConflictExpr,
T_IntoClause,
- T_CollateClause,
/*
* TAGS FOR EXPRESSION STATE NODES (execnodes.h)
*/
T_ExprState = 400,
T_GenericExprState,
+ T_WholeRowVarExprState,
T_AggrefExprState,
+ T_GroupingFuncExprState,
T_WindowFuncExprState,
T_ArrayRefExprState,
T_FuncExprState,
T_PlannerGlobal,
T_RelOptInfo,
T_IndexOptInfo,
+ T_ParamPathInfo,
T_Path,
T_IndexPath,
T_BitmapHeapPath,
T_MergePath,
T_HashPath,
T_TidPath,
+ T_ForeignPath,
+ T_CustomPath,
T_AppendPath,
T_MergeAppendPath,
T_ResultPath,
T_EquivalenceMember,
T_PathKey,
T_RestrictInfo,
- T_InnerIndexscanInfo,
T_PlaceHolderVar,
T_SpecialJoinInfo,
+ T_LateralJoinInfo,
T_AppendRelInfo,
T_PlaceHolderInfo,
T_MinMaxAggInfo,
T_IndexStmt,
T_CreateFunctionStmt,
T_AlterFunctionStmt,
- T_RemoveFuncStmt,
T_DoStmt,
T_RenameStmt,
T_RuleStmt,
T_DropdbStmt,
T_VacuumStmt,
T_ExplainStmt,
+ T_CreateTableAsStmt,
T_CreateSeqStmt,
T_AlterSeqStmt,
T_VariableSetStmt,
T_VariableShowStmt,
T_DiscardStmt,
T_CreateTrigStmt,
- T_DropPropertyStmt,
T_CreatePLangStmt,
- T_DropPLangStmt,
T_CreateRoleStmt,
T_AlterRoleStmt,
T_DropRoleStmt,
T_AlterRoleSetStmt,
T_CreateConversionStmt,
T_CreateCastStmt,
- T_DropCastStmt,
T_CreateOpClassStmt,
T_CreateOpFamilyStmt,
T_AlterOpFamilyStmt,
- T_RemoveOpClassStmt,
- T_RemoveOpFamilyStmt,
T_PrepareStmt,
T_ExecuteStmt,
T_DeallocateStmt,
T_ReassignOwnedStmt,
T_CompositeTypeStmt,
T_CreateEnumStmt,
+ T_CreateRangeStmt,
T_AlterEnumStmt,
T_AlterTSDictionaryStmt,
T_AlterTSConfigurationStmt,
T_CreateFdwStmt,
T_AlterFdwStmt,
- T_DropFdwStmt,
T_CreateForeignServerStmt,
T_AlterForeignServerStmt,
- T_DropForeignServerStmt,
T_CreateUserMappingStmt,
T_AlterUserMappingStmt,
T_DropUserMappingStmt,
T_AlterTableSpaceOptionsStmt,
+ T_AlterTableMoveAllStmt,
T_SecLabelStmt,
T_CreateForeignTableStmt,
+ T_ImportForeignSchemaStmt,
T_CreateExtensionStmt,
- T_AlterExtensionAddStmt,
+ T_AlterExtensionStmt,
+ T_AlterExtensionContentsStmt,
+ T_CreateEventTrigStmt,
+ T_AlterEventTrigStmt,
+ T_RefreshMatViewStmt,
+ T_ReplicaIdentityStmt,
+ T_AlterSystemStmt,
+ T_CreatePolicyStmt,
+ T_AlterPolicyStmt,
+ T_CreateTransformStmt,
/*
* TAGS FOR PARSE TREE NODES (parsenodes.h)
T_A_Indirection,
T_A_ArrayExpr,
T_ResTarget,
+ T_MultiAssignRef,
T_TypeCast,
+ T_CollateClause,
T_SortBy,
T_WindowDef,
T_RangeSubselect,
T_Constraint,
T_DefElem,
T_RangeTblEntry,
+ T_RangeTblFunction,
+ T_WithCheckOption,
T_SortGroupClause,
+ T_GroupingSet,
T_WindowClause,
T_PrivGrantee,
T_FuncWithArgs,
T_AccessPriv,
T_CreateOpClassItem,
- T_InhRelation,
+ T_TableLikeClause,
T_FunctionParameter,
T_LockingClause,
T_RowMarkClause,
T_XmlSerialize,
T_WithClause,
+ T_InferClause,
+ T_OnConflictClause,
T_CommonTableExpr,
+ T_RoleSpec,
+ T_RangeTableSample,
+ T_TableSampleClause,
+
+ /*
+ * TAGS FOR REPLICATION GRAMMAR PARSE NODES (replnodes.h)
+ */
+ T_IdentifySystemCmd,
+ T_BaseBackupCmd,
+ T_CreateReplicationSlotCmd,
+ T_DropReplicationSlotCmd,
+ T_StartReplicationCmd,
+ T_TimeLineHistoryCmd,
/*
* TAGS FOR RANDOM OTHER STUFF
* pass multiple object types through the same pointer).
*/
T_TriggerData = 950, /* in commands/trigger.h */
+ T_EventTriggerData, /* in commands/event_trigger.h */
T_ReturnSetInfo, /* in nodes/execnodes.h */
T_WindowObjectData, /* private in nodeWindowAgg.c */
T_TIDBitmap, /* in nodes/tidbitmap.h */
- T_InlineCodeBlock /* in nodes/parsenodes.h */
+ T_InlineCodeBlock, /* in nodes/parsenodes.h */
+ T_FdwRoutine /* in foreign/fdwapi.h */
} NodeTag;
/*
NodeTag type;
} Node;
-#define nodeTag(nodeptr) (((Node*)(nodeptr))->type)
+#define nodeTag(nodeptr) (((const Node*)(nodeptr))->type)
/*
* newNode -
/*
* nodes/{outfuncs.c,print.c}
*/
-extern char *nodeToString(void *obj);
+extern char *nodeToString(const void *obj);
/*
* nodes/{readfuncs.c,read.c}
/*
* nodes/copyfuncs.c
*/
-extern void *copyObject(void *obj);
+extern void *copyObject(const void *obj);
/*
* nodes/equalfuncs.c
*/
-extern bool equal(void *a, void *b);
+extern bool equal(const void *a, const void *b);
/*
/*
* Semijoins and anti-semijoins (as defined in relational theory) do not
* appear in the SQL JOIN syntax, but there are standard idioms for
- * representing them (e.g., using EXISTS). The planner recognizes these
+ * representing them (e.g., using EXISTS). The planner recognizes these
* cases and converts them to joins. So the planner and executor must
* support these codes. NOTE: in JOIN_SEMI output, it is unspecified
* which matching RHS row is joined to. In JOIN_ANTI output, the row is
/*
* OUTER joins are those for which pushed-down quals must behave differently
* from the join's own quals. This is in fact everything except INNER and
- * SEMI joins. However, this macro must also exclude the JOIN_UNIQUE symbols
+ * SEMI joins. However, this macro must also exclude the JOIN_UNIQUE symbols
* since those are temporary proxies for what will eventually be an INNER
* join.
*
(1 << JOIN_RIGHT) | \
(1 << JOIN_ANTI))) != 0)
+/*
+ * OnConflictAction -
+ * "ON CONFLICT" clause type of query
+ *
+ * This is needed in both parsenodes.h and plannodes.h, so put it here...
+ */
+typedef enum OnConflictAction
+{
+ ONCONFLICT_NONE, /* No "ON CONFLICT" clause */
+ ONCONFLICT_NOTHING, /* ON CONFLICT ... DO NOTHING */
+ ONCONFLICT_UPDATE /* ON CONFLICT ... DO UPDATE */
+} OnConflictAction;
+
#endif /* NODES_H */