PostgreSQL Source Code
git master
|
#include "nodes/parsenodes.h"
Go to the source code of this file.
Macros | |
#define | QTW_IGNORE_RT_SUBQUERIES 0x01 /* subqueries in rtable */ |
#define | QTW_IGNORE_CTE_SUBQUERIES 0x02 /* subqueries in cteList */ |
#define | QTW_IGNORE_RC_SUBQUERIES 0x03 /* both of above */ |
#define | QTW_IGNORE_JOINALIASES 0x04 /* JOIN alias var lists */ |
#define | QTW_IGNORE_RANGE_TABLE 0x08 /* skip rangetable entirely */ |
#define | QTW_EXAMINE_RTES_BEFORE |
#define | QTW_EXAMINE_RTES_AFTER |
#define | QTW_DONT_COPY_QUERY 0x40 /* do not copy top Query */ |
#define | QTW_EXAMINE_SORTGROUP 0x80 /* include SortGroupNode lists */ |
Typedefs | |
typedef bool(* | check_function_callback) (Oid func_id, void *context) |
Functions | |
Oid | exprType (const Node *expr) |
int32 | exprTypmod (const Node *expr) |
bool | exprIsLengthCoercion (const Node *expr, int32 *coercedTypmod) |
Node * | applyRelabelType (Node *arg, Oid rtype, int32 rtypmod, Oid rcollid, CoercionForm rformat, int rlocation, bool overwrite_ok) |
Node * | relabel_to_typmod (Node *expr, int32 typmod) |
Node * | strip_implicit_coercions (Node *node) |
bool | expression_returns_set (Node *clause) |
Oid | exprCollation (const Node *expr) |
Oid | exprInputCollation (const Node *expr) |
void | exprSetCollation (Node *expr, Oid collation) |
void | exprSetInputCollation (Node *expr, Oid inputcollation) |
int | exprLocation (const Node *expr) |
void | fix_opfuncids (Node *node) |
void | set_opfuncid (OpExpr *opexpr) |
void | set_sa_opfuncid (ScalarArrayOpExpr *opexpr) |
static bool | is_funcclause (const void *clause) |
static bool | is_opclause (const void *clause) |
static Node * | get_leftop (const void *clause) |
static Node * | get_rightop (const void *clause) |
static bool | is_andclause (const void *clause) |
static bool | is_orclause (const void *clause) |
static bool | is_notclause (const void *clause) |
static Expr * | get_notclausearg (const void *notclause) |
bool | check_functions_in_node (Node *node, check_function_callback checker, void *context) |
bool | expression_tree_walker (Node *node, bool(*walker)(), void *context) |
Node * | expression_tree_mutator (Node *node, Node *(*mutator)(), void *context) |
bool | query_tree_walker (Query *query, bool(*walker)(), void *context, int flags) |
Query * | query_tree_mutator (Query *query, Node *(*mutator)(), void *context, int flags) |
bool | range_table_walker (List *rtable, bool(*walker)(), void *context, int flags) |
List * | range_table_mutator (List *rtable, Node *(*mutator)(), void *context, int flags) |
bool | range_table_entry_walker (RangeTblEntry *rte, bool(*walker)(), void *context, int flags) |
bool | query_or_expression_tree_walker (Node *node, bool(*walker)(), void *context, int flags) |
Node * | query_or_expression_tree_mutator (Node *node, Node *(*mutator)(), void *context, int flags) |
bool | raw_expression_tree_walker (Node *node, bool(*walker)(), void *context) |
bool | planstate_tree_walker (struct PlanState *planstate, bool(*walker)(), void *context) |
#define QTW_DONT_COPY_QUERY 0x40 /* do not copy top Query */ |
Definition at line 29 of file nodeFuncs.h.
Referenced by query_tree_mutator().
#define QTW_EXAMINE_RTES_AFTER |
Definition at line 27 of file nodeFuncs.h.
Referenced by inline_cte_walker(), and range_table_entry_walker().
#define QTW_EXAMINE_RTES_BEFORE |
Definition at line 25 of file nodeFuncs.h.
Referenced by contain_outer_selfref_walker(), flatten_rtes_walker(), flatten_unplanned_rtes(), IncrementVarSublevelsUp(), IncrementVarSublevelsUp_rtable(), IncrementVarSublevelsUp_walker(), and range_table_entry_walker().
#define QTW_EXAMINE_SORTGROUP 0x80 /* include SortGroupNode lists */ |
Definition at line 30 of file nodeFuncs.h.
Referenced by find_expr_references_walker(), query_tree_mutator(), and query_tree_walker().
#define QTW_IGNORE_CTE_SUBQUERIES 0x02 /* subqueries in cteList */ |
Definition at line 21 of file nodeFuncs.h.
Referenced by assign_query_collations(), query_tree_mutator(), and query_tree_walker().
#define QTW_IGNORE_JOINALIASES 0x04 /* JOIN alias var lists */ |
Definition at line 23 of file nodeFuncs.h.
Referenced by find_expr_references_walker(), flatten_join_alias_vars_mutator(), isQueryUsingTempRelation_walker(), LockViewRecurse_walker(), range_table_entry_walker(), and range_table_mutator().
#define QTW_IGNORE_RANGE_TABLE 0x08 /* skip rangetable entirely */ |
Definition at line 24 of file nodeFuncs.h.
Referenced by assign_query_collations(), and query_tree_walker().
#define QTW_IGNORE_RC_SUBQUERIES 0x03 /* both of above */ |
Definition at line 22 of file nodeFuncs.h.
Referenced by AcquireRewriteLocks(), adjust_appendrel_attrs(), checkExprHasSubLink(), fireRIRrules(), rewriteTargetView(), ScanQueryForLocks(), and setRuleCheckAsUser_Query().
#define QTW_IGNORE_RT_SUBQUERIES 0x01 /* subqueries in rtable */ |
Definition at line 20 of file nodeFuncs.h.
Referenced by range_table_entry_walker(), and range_table_mutator().
Definition at line 33 of file nodeFuncs.h.
Node* applyRelabelType | ( | Node * | arg, |
Oid | rtype, | ||
int32 | rtypmod, | ||
Oid | rcollid, | ||
CoercionForm | rformat, | ||
int | rlocation, | ||
bool | overwrite_ok | ||
) |
Definition at line 582 of file nodeFuncs.c.
References arg, RelabelType::arg, Const::constcollid, Const::consttype, Const::consttypmod, copyObject, exprCollation(), exprType(), exprTypmod(), IsA, RelabelType::location, makeNode, RelabelType::relabelformat, RelabelType::resultcollid, RelabelType::resulttype, and RelabelType::resulttypmod.
Referenced by canonicalize_ec_expression(), eval_const_expressions_mutator(), generate_setop_tlist(), and relabel_to_typmod().
bool check_functions_in_node | ( | Node * | node, |
check_function_callback | checker, | ||
void * | context | ||
) |
Definition at line 1702 of file nodeFuncs.c.
References Aggref::aggfnoid, CoerceViaIO::arg, exprType(), FuncExpr::funcid, get_opcode(), getTypeInputInfo(), getTypeOutputInfo(), lfirst_oid, nodeTag, OpExpr::opfuncid, ScalarArrayOpExpr::opfuncid, RowCompareExpr::opnos, CoerceViaIO::resulttype, set_opfuncid(), set_sa_opfuncid(), T_Aggref, T_CoerceViaIO, T_DistinctExpr, T_FuncExpr, T_NullIfExpr, T_OpExpr, T_RowCompareExpr, T_ScalarArrayOpExpr, T_WindowFunc, and WindowFunc::winfnoid.
Referenced by contain_leaked_vars_walker(), contain_mutable_functions_walker(), contain_nonstrict_functions_walker(), contain_volatile_functions_not_nextval_walker(), contain_volatile_functions_walker(), get_notclausearg(), and max_parallel_hazard_walker().
Definition at line 759 of file nodeFuncs.c.
References arg, ARRAY_SUBLINK, Assert, elog, ERROR, EXPR_SUBLINK, exprCollation(), SubPlan::firstColCollation, InvalidOid, IS_XMLSERIALIZE, IsA, linitial, linitial_node, nodeTag, SubLink::subLinkType, SubPlan::subLinkType, AlternativeSubPlan::subplans, SubLink::subselect, T_Aggref, T_AlternativeSubPlan, T_ArrayCoerceExpr, T_ArrayExpr, T_BooleanTest, T_BoolExpr, T_CaseExpr, T_CaseTestExpr, T_CoalesceExpr, T_CoerceToDomain, T_CoerceToDomainValue, T_CoerceViaIO, T_CollateExpr, T_Const, T_ConvertRowtypeExpr, T_CurrentOfExpr, T_DistinctExpr, T_FieldSelect, T_FieldStore, T_FuncExpr, T_GroupingFunc, T_InferenceElem, T_MinMaxExpr, T_NamedArgExpr, T_NextValueExpr, T_NullIfExpr, T_NullTest, T_OpExpr, T_Param, T_PlaceHolderVar, T_RelabelType, T_RowCompareExpr, T_RowExpr, T_ScalarArrayOpExpr, T_SetToDefault, T_SQLValueFunction, T_SubLink, T_SubPlan, T_SubscriptingRef, T_Var, T_WindowFunc, T_XmlExpr, Query::targetList, and generate_unaccent_rules::type.
Referenced by addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), analyzeCTE(), analyzeCTETargetList(), applyRelabelType(), assign_collations_walker(), assign_hypothetical_collations(), build_expression_pathkey(), build_pertrans_for_aggref(), build_subplan(), canonicalize_ec_expression(), ComputeIndexAttrs(), ComputePartitionAttrs(), convert_EXISTS_to_ANY(), create_ctas_nodata(), create_limit_plan(), create_unique_plan(), create_windowagg_plan(), DefineVirtualRelation(), eval_const_expressions_mutator(), examine_attribute(), ExecInitFunctionScan(), ExecInitIndexScan(), ExecTypeFromExprList(), ExecTypeFromTLInternal(), expandRecordVariable(), expandRTE(), exprCollation(), exprSetCollation(), extract_grouping_collations(), fix_indexqual_operand(), generate_setop_tlist(), generate_subquery_params(), get_expr_result_type(), get_first_col_type(), inline_function(), make_pathkey_from_sortop(), make_recursive_union(), make_setop(), make_sort_from_groupcols(), make_sort_from_sortclauses(), make_unique_from_sortclauses(), makeVarFromTargetEntry(), makeWholeRowVar(), ordered_set_startup(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), preprocess_minmax_aggregates(), relabel_to_typmod(), RelationBuildPartitionKey(), RelationGetDummyIndexExpressions(), remove_unused_subquery_outputs(), replace_nestloop_param_placeholdervar(), replace_outer_placeholdervar(), scalararraysel(), set_dummy_tlist_references(), set_joinrel_partition_key_exprs(), tlist_same_collations(), transformCaseExpr(), transformFromClauseItem(), transformMultiAssignRef(), transformPLAssignStmt(), transformSubLink(), and transformWindowDefinitions().
Definition at line 709 of file nodeFuncs.c.
References expression_returns_set_walker().
Referenced by check_output_expressions(), coerce_to_boolean(), coerce_to_specific_type_typmod(), ExecInitProjectSet(), get_eclass_for_sort_expr(), is_simple_values(), make_row_comparison_op(), make_sort_input_target(), remove_unused_subquery_outputs(), and subquery_planner().
Definition at line 2579 of file nodeFuncs.c.
References Aggref::aggargtypes, Aggref::aggdirectargs, Aggref::aggdistinct, Aggref::aggfilter, WindowFunc::aggfilter, Aggref::aggorder, OnConflictExpr::arbiterElems, OnConflictExpr::arbiterWhere, NamedArgExpr::arg, FieldSelect::arg, FieldStore::arg, RelabelType::arg, CoerceViaIO::arg, ArrayCoerceExpr::arg, ConvertRowtypeExpr::arg, CollateExpr::arg, CaseExpr::arg, NullTest::arg, BooleanTest::arg, CoerceToDomain::arg, Aggref::args, GroupingFunc::args, WindowFunc::args, FuncExpr::args, OpExpr::args, ScalarArrayOpExpr::args, BoolExpr::args, SubPlan::args, CaseExpr::args, RowExpr::args, CoalesceExpr::args, MinMaxExpr::args, TableSampleClause::args, XmlExpr::args, check_stack_depth(), TableFunc::coldefexprs, TableFunc::colexprs, GroupingFunc::cols, copyObject, CommonTableExpr::ctequery, CommonTableExpr::cycle_clause, CTECycleClause::cycle_mark_default, CTECycleClause::cycle_mark_value, CaseExpr::defresult, TableFunc::docexpr, ArrayExpr::elements, ArrayCoerceExpr::elemexpr, elog, WindowClause::endOffset, ERROR, OnConflictExpr::exclRelTlist, CaseWhen::expr, InferenceElem::expr, TargetEntry::expr, PartitionPruneStepOp::exprs, FieldStore::fieldnums, FLATCOPY, FromExpr::fromlist, RangeTblFunction::funcexpr, IndexClause::indexquals, lappend(), JoinExpr::larg, SetOperationStmt::larg, RowCompareExpr::largs, lfirst, list_copy(), MUTATE, XmlExpr::named_args, FieldStore::newvals, NIL, nodeTag, TableFunc::ns_uris, OnConflictExpr::onConflictSet, OnConflictExpr::onConflictWhere, WindowClause::orderClause, WindowClause::partitionClause, PlaceHolderInfo::ph_var, PlaceHolderVar::phexpr, WithCheckOption::qual, JoinExpr::quals, FromExpr::quals, JoinExpr::rarg, SetOperationStmt::rarg, RowCompareExpr::rargs, SubscriptingRef::refassgnexpr, SubscriptingRef::refexpr, SubscriptingRef::reflowerindexpr, GroupingFunc::refs, SubscriptingRef::refupperindexpr, TableSampleClause::repeatable, CaseWhen::result, IndexClause::rinfo, TableFunc::rowexpr, CommonTableExpr::search_clause, WindowClause::startOffset, AlternativeSubPlan::subplans, SubLink::subselect, T_Aggref, T_AlternativeSubPlan, T_AppendRelInfo, T_ArrayCoerceExpr, T_ArrayExpr, T_BooleanTest, T_BoolExpr, T_CaseExpr, T_CaseTestExpr, T_CaseWhen, T_CoalesceExpr, T_CoerceToDomain, T_CoerceToDomainValue, T_CoerceViaIO, T_CollateExpr, T_CommonTableExpr, T_Const, T_ConvertRowtypeExpr, T_CTECycleClause, T_CTESearchClause, T_CurrentOfExpr, T_DistinctExpr, T_FieldSelect, T_FieldStore, T_FromExpr, T_FuncExpr, T_GroupingFunc, T_IndexClause, T_InferenceElem, T_JoinExpr, T_List, T_MinMaxExpr, T_NamedArgExpr, T_NextValueExpr, T_NullIfExpr, T_NullTest, T_OnConflictExpr, T_OpExpr, T_Param, T_PartitionPruneStepCombine, T_PartitionPruneStepOp, T_PlaceHolderInfo, T_PlaceHolderVar, T_Query, T_RangeTblFunction, T_RangeTblRef, T_RelabelType, T_RowCompareExpr, T_RowExpr, T_ScalarArrayOpExpr, T_SetOperationStmt, T_SetToDefault, T_SortGroupClause, T_SQLValueFunction, T_SubLink, T_SubPlan, T_SubscriptingRef, T_TableFunc, T_TableSampleClause, T_TargetEntry, T_Var, T_WindowClause, T_WindowFunc, T_WithCheckOption, T_XmlExpr, SubLink::testexpr, SubPlan::testexpr, and AppendRelInfo::translated_vars.
Referenced by adjust_appendrel_attrs_mutator(), convert_combining_aggrefs(), convert_testexpr_mutator(), eval_const_expressions_mutator(), fix_join_expr_mutator(), fix_scan_expr_mutator(), fix_upper_expr_mutator(), flatten_join_alias_vars_mutator(), get_notclausearg(), map_variable_attnos_mutator(), process_sublinks_mutator(), replace_correlation_vars_mutator(), replace_nestloop_params_mutator(), replace_rte_variables_mutator(), simplify_function(), substitute_actual_parameters_mutator(), and substitute_actual_srf_parameters_mutator().
Definition at line 1885 of file nodeFuncs.c.
References Aggref::aggdirectargs, Aggref::aggdistinct, Aggref::aggfilter, WindowFunc::aggfilter, Aggref::aggorder, OnConflictExpr::arbiterElems, OnConflictExpr::arbiterWhere, arg, FieldStore::arg, ArrayCoerceExpr::arg, CaseExpr::arg, generate_unaccent_rules::args, Aggref::args, GroupingFunc::args, WindowFunc::args, FuncExpr::args, OpExpr::args, ScalarArrayOpExpr::args, BoolExpr::args, SubPlan::args, CaseExpr::args, TableSampleClause::args, XmlExpr::args, check_stack_depth(), TableFunc::coldefexprs, TableFunc::colexprs, CommonTableExpr::ctequery, CommonTableExpr::cycle_clause, CTECycleClause::cycle_mark_default, CTECycleClause::cycle_mark_value, CaseExpr::defresult, TableFunc::docexpr, ArrayCoerceExpr::elemexpr, elog, WindowClause::endOffset, ERROR, OnConflictExpr::exclRelTlist, CaseWhen::expr, expression_tree_walker(), PartitionPruneStepOp::exprs, FromExpr::fromlist, IndexClause::indexquals, JoinExpr::larg, SetOperationStmt::larg, RowCompareExpr::largs, lfirst, lfirst_node, XmlExpr::named_args, FieldStore::newvals, nodeTag, TableFunc::ns_uris, OnConflictExpr::onConflictSet, OnConflictExpr::onConflictWhere, WindowClause::orderClause, WindowClause::partitionClause, JoinExpr::quals, FromExpr::quals, JoinExpr::rarg, SetOperationStmt::rarg, RowCompareExpr::rargs, SubscriptingRef::refassgnexpr, SubscriptingRef::refexpr, SubscriptingRef::reflowerindexpr, SubscriptingRef::refupperindexpr, TableSampleClause::repeatable, CaseWhen::result, IndexClause::rinfo, TableFunc::rowexpr, CommonTableExpr::search_clause, WindowClause::startOffset, SubLink::subselect, T_Aggref, T_AlternativeSubPlan, T_AppendRelInfo, T_ArrayCoerceExpr, T_ArrayExpr, T_BooleanTest, T_BoolExpr, T_CaseExpr, T_CaseTestExpr, T_CoalesceExpr, T_CoerceToDomain, T_CoerceToDomainValue, T_CoerceViaIO, T_CollateExpr, T_CommonTableExpr, T_Const, T_ConvertRowtypeExpr, T_CTECycleClause, T_CTESearchClause, T_CurrentOfExpr, T_DistinctExpr, T_FieldSelect, T_FieldStore, T_FromExpr, T_FuncExpr, T_GroupingFunc, T_IndexClause, T_InferenceElem, T_JoinExpr, T_List, T_MinMaxExpr, T_NamedArgExpr, T_NextValueExpr, T_NullIfExpr, T_NullTest, T_OnConflictExpr, T_OpExpr, T_Param, T_PartitionPruneStepCombine, T_PartitionPruneStepOp, T_PlaceHolderInfo, T_PlaceHolderVar, T_Query, T_RangeTblFunction, T_RangeTblRef, T_RelabelType, T_RowCompareExpr, T_RowExpr, T_ScalarArrayOpExpr, T_SetOperationStmt, T_SetToDefault, T_SortGroupClause, T_SQLValueFunction, T_SubLink, T_SubPlan, T_SubscriptingRef, T_TableFunc, T_TableSampleClause, T_TargetEntry, T_Var, T_WindowClause, T_WindowFunc, T_WithCheckOption, T_XmlExpr, SubLink::testexpr, SubPlan::testexpr, and AppendRelInfo::translated_vars.
Referenced by acquireLocksOnSubLinks(), assign_collations_walker(), ChangeVarNodes_walker(), check_agg_arguments(), check_agg_arguments_walker(), check_nested_generated_walker(), check_parameter_resolution_walker(), check_ungrouped_columns_walker(), checkExprHasSubLink_walker(), contain_agg_clause_walker(), contain_aggs_of_level_walker(), contain_context_dependent_node_walker(), contain_dml_walker(), contain_exec_param_walker(), contain_leaked_vars_walker(), contain_mutable_functions_walker(), contain_non_const_walker(), contain_nonstrict_functions_walker(), contain_outer_selfref_walker(), contain_subplans_walker(), contain_var_clause_walker(), contain_vars_of_level_walker(), contain_volatile_functions_not_nextval_walker(), contain_volatile_functions_walker(), contain_windowfuncs_walker(), contains_multiexpr_param(), cost_qual_eval_walker(), expression_returns_set_walker(), expression_tree_walker(), extract_query_dependencies_walker(), finalize_agg_primnode(), finalize_grouping_exprs_walker(), finalize_primnode(), find_cols_walker(), find_dependent_phvs_walker(), find_expr_references_walker(), find_window_functions_walker(), fireRIRonSubLink(), fireRIRrules(), fix_opfuncids_walker(), fix_scan_expr_walker(), flatten_rtes_walker(), get_last_attnums_walker(), get_notclausearg(), IncrementVarSublevelsUp_walker(), index_expression_changed_walker(), inline_cte_walker(), isQueryUsingTempRelation_walker(), locate_agg_of_level_walker(), locate_var_of_level_walker(), locate_windowfunc_walker(), LockViewRecurse_walker(), max_parallel_hazard_walker(), OffsetVarNodes_walker(), preprocess_aggrefs_walker(), pull_exec_paramids_walker(), pull_var_clause_walker(), pull_varattnos_walker(), pull_varnos_walker(), pull_vars_walker(), query_contains_extern_params_walker(), rangeTableEntry_used_walker(), ScanQueryWalker(), setRuleCheckAsUser_walker(), split_pathtarget_walker(), and substitute_phv_relids_walker().
Definition at line 964 of file nodeFuncs.c.
References InvalidOid, nodeTag, T_Aggref, T_DistinctExpr, T_FuncExpr, T_MinMaxExpr, T_NullIfExpr, T_OpExpr, T_ScalarArrayOpExpr, and T_WindowFunc.
Referenced by resolve_polymorphic_tupdesc().
Definition at line 503 of file nodeFuncs.c.
References FuncExpr::args, COERCE_EXPLICIT_CAST, COERCE_IMPLICIT_CAST, Const::constisnull, Const::consttype, Const::constvalue, DatumGetInt32, FuncExpr::funcformat, IsA, list_length(), lsecond, and ArrayCoerceExpr::resulttypmod.
Referenced by deparseFuncExpr(), exprTypmod(), and get_func_expr().
int exprLocation | ( | const Node * | expr | ) |
Definition at line 1231 of file nodeFuncs.c.
References arg, TypeCast::arg, NamedArgExpr::arg, RelabelType::arg, CoerceViaIO::arg, ArrayCoerceExpr::arg, ConvertRowtypeExpr::arg, NullTest::arg, BooleanTest::arg, CoerceToDomain::arg, FuncCall::args, FuncExpr::args, OpExpr::args, ScalarArrayOpExpr::args, BoolExpr::args, XmlExpr::args, exprLocation(), fc(), leftmostLoc(), A_Expr::lexpr, lfirst, TypeName::location, A_Expr::location, TypeCast::location, FuncCall::location, FuncExpr::location, NamedArgExpr::location, OpExpr::location, ScalarArrayOpExpr::location, BoolExpr::location, SubLink::location, RelabelType::location, CoerceViaIO::location, ArrayCoerceExpr::location, ConvertRowtypeExpr::location, XmlExpr::location, NullTest::location, BooleanTest::location, CoerceToDomain::location, nodeTag, source, T_A_ArrayExpr, T_A_Const, T_A_Expr, T_Aggref, T_ArrayCoerceExpr, T_ArrayExpr, T_BooleanTest, T_BoolExpr, T_CaseExpr, T_CaseWhen, T_CoalesceExpr, T_CoerceToDomain, T_CoerceToDomainValue, T_CoerceViaIO, T_CollateClause, T_CollateExpr, T_ColumnDef, T_ColumnRef, T_CommonTableExpr, T_Const, T_Constraint, T_ConvertRowtypeExpr, T_CTECycleClause, T_CTESearchClause, T_DistinctExpr, T_FieldSelect, T_FieldStore, T_FuncCall, T_FuncExpr, T_FunctionParameter, T_GroupingFunc, T_GroupingSet, T_InferClause, T_InferenceElem, T_IntoClause, T_List, T_MinMaxExpr, T_MultiAssignRef, T_NamedArgExpr, T_NullIfExpr, T_NullTest, T_OnConflictClause, T_OpExpr, T_Param, T_ParamRef, T_PartitionBoundSpec, T_PartitionElem, T_PartitionRangeDatum, T_PartitionSpec, T_PlaceHolderVar, T_RangeTableSample, T_RangeVar, T_RelabelType, T_ResTarget, T_RowCompareExpr, T_RowExpr, T_ScalarArrayOpExpr, T_SetToDefault, T_SortBy, T_SQLValueFunction, T_SubLink, T_SubscriptingRef, T_TableFunc, T_TargetEntry, T_TypeCast, T_TypeName, T_Var, T_WindowDef, T_WindowFunc, T_WithClause, T_XmlExpr, T_XmlSerialize, SubLink::testexpr, and TypeCast::typeName.
Referenced by addRangeTableEntryForFunction(), addTargetToSortList(), analyzeCTE(), array_subscript_transform(), assign_collations_walker(), check_agg_arguments_walker(), check_srf_call_placement(), checkWellFormedRecursion(), coerce_to_boolean(), coerce_to_common_type(), coerce_to_specific_type_typmod(), EvaluateParams(), ExecInitFunc(), ExecInitSubscriptingRef(), exprLocation(), finalize_grouping_exprs_walker(), get_matching_location(), hstore_subscript_transform(), init_sexpr(), jsonb_subscript_transform(), parseCheckAggregates(), ParseFuncOrColumn(), parser_coercion_errposition(), resolve_unique_index_expr(), select_common_type(), transformAggregateCall(), transformArrayExpr(), transformAssignedExpr(), transformCaseExpr(), transformCoalesceExpr(), transformContainerSubscripts(), transformDistinctClause(), transformDistinctOnClause(), transformFrameOffset(), transformFromClauseItem(), transformGroupClause(), transformGroupClauseExpr(), transformGroupingSet(), transformIndirection(), transformInsertRow(), transformInsertStmt(), transformMultiAssignRef(), transformOnConflictArbiter(), transformPartitionBound(), transformPartitionBoundValue(), transformPartitionRangeBounds(), transformPLAssignStmt(), transformRangeFunction(), transformReturningList(), transformSelectStmt(), transformSetOperationStmt(), transformSetOperationTree(), transformValuesClause(), and validateInfiniteBounds().
Definition at line 1012 of file nodeFuncs.c.
References arg, ARRAY_SUBLINK, Assert, elog, ERROR, EXPR_SUBLINK, exprCollation(), InvalidOid, IS_XMLSERIALIZE, IsA, linitial_node, nodeTag, OidIsValid, SubLink::subLinkType, SubLink::subselect, T_Aggref, T_ArrayCoerceExpr, T_ArrayExpr, T_BooleanTest, T_BoolExpr, T_CaseExpr, T_CoalesceExpr, T_CoerceToDomain, T_CoerceToDomainValue, T_CoerceViaIO, T_Const, T_ConvertRowtypeExpr, T_CurrentOfExpr, T_DistinctExpr, T_FieldSelect, T_FieldStore, T_FuncExpr, T_GroupingFunc, T_MinMaxExpr, T_NamedArgExpr, T_NextValueExpr, T_NullIfExpr, T_NullTest, T_OpExpr, T_Param, T_RelabelType, T_RowCompareExpr, T_RowExpr, T_ScalarArrayOpExpr, T_SetToDefault, T_SQLValueFunction, T_SubLink, T_SubscriptingRef, T_Var, T_WindowFunc, T_XmlExpr, Query::targetList, and generate_unaccent_rules::type.
Referenced by assign_collations_walker().
Definition at line 1167 of file nodeFuncs.c.
References nodeTag, T_Aggref, T_DistinctExpr, T_FuncExpr, T_MinMaxExpr, T_NullIfExpr, T_OpExpr, T_ScalarArrayOpExpr, and T_WindowFunc.
Referenced by assign_collations_walker().
Definition at line 41 of file nodeFuncs.c.
References arg, ARRAY_SUBLINK, Assert, elog, ereport, errcode(), errmsg(), ERROR, InferenceElem::expr, EXPR_SUBLINK, exprType(), SubPlan::firstColType, format_type_be(), get_promoted_array_type(), InvalidOid, IS_DOCUMENT, IS_XMLSERIALIZE, IsA, linitial, linitial_node, MULTIEXPR_SUBLINK, nodeTag, OidIsValid, SubLink::subLinkType, SubPlan::subLinkType, AlternativeSubPlan::subplans, SubLink::subselect, T_Aggref, T_AlternativeSubPlan, T_ArrayCoerceExpr, T_ArrayExpr, T_BooleanTest, T_BoolExpr, T_CaseExpr, T_CaseTestExpr, T_CoalesceExpr, T_CoerceToDomain, T_CoerceToDomainValue, T_CoerceViaIO, T_CollateExpr, T_Const, T_ConvertRowtypeExpr, T_CurrentOfExpr, T_DistinctExpr, T_FieldSelect, T_FieldStore, T_FuncExpr, T_GroupingFunc, T_InferenceElem, T_MinMaxExpr, T_NamedArgExpr, T_NextValueExpr, T_NullIfExpr, T_NullTest, T_OpExpr, T_Param, T_PlaceHolderVar, T_RelabelType, T_RowCompareExpr, T_RowExpr, T_ScalarArrayOpExpr, T_SetToDefault, T_SQLValueFunction, T_SubLink, T_SubPlan, T_SubscriptingRef, T_Var, T_WindowFunc, T_XmlExpr, Query::targetList, and generate_unaccent_rules::type.
Referenced by addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), addTargetToGroupList(), addTargetToSortList(), analyzeCTE(), analyzeCTETargetList(), appendAggOrderBy(), applyRelabelType(), array_subscript_transform(), assign_collations_walker(), assign_hypothetical_collations(), assign_param_for_placeholdervar(), ATExecAlterColumnType(), ATPrepAlterColumnType(), build_coercion_expression(), build_column_default(), build_subplan(), can_minmax_aggs(), canonicalize_ec_expression(), check_functions_in_node(), check_hashjoinable(), check_mergejoinable(), check_sql_fn_retval(), checkRuleResultList(), coerce_fn_result_column(), coerce_record_to_complex(), coerce_to_boolean(), coerce_to_common_type(), coerce_to_specific_type_typmod(), compare_tlist_datatypes(), compute_semijoin_info(), ComputeIndexAttrs(), ComputePartitionAttrs(), ConstructTupleDescriptor(), convert_EXISTS_to_ANY(), cookDefault(), cost_qual_eval_walker(), create_ctas_nodata(), create_indexscan_plan(), DefineVirtualRelation(), deparseNullTest(), estimate_num_groups(), eval_const_expressions_mutator(), EvaluateParams(), examine_attribute(), examine_variable(), exec_save_simple_expr(), ExecBuildProjectionInfo(), ExecCheckPlanOutput(), ExecEvalConvertRowtype(), ExecEvalXmlExpr(), ExecInitExprRec(), ExecInitIndexScan(), ExecMakeTableFunctionResult(), ExecTypeFromExprList(), ExecTypeFromTLInternal(), ExecWindowAgg(), expandRecordVariable(), expandRTE(), exprType(), exprTypmod(), find_expr_references_walker(), find_placeholder_info(), fix_indexqual_operand(), foreign_expr_walker(), generate_append_tlist(), generate_join_implied_equalities_normal(), generate_setop_tlist(), generate_subquery_params(), generateClonedIndexStmt(), get_call_expr_argtype(), get_expr_result_tupdesc(), get_expr_result_type(), get_first_col_type(), get_fn_expr_rettype(), get_func_expr(), get_oper_expr(), get_rule_expr(), get_rule_expr_funccall(), get_rule_orderby(), get_simple_binary_op_name(), get_sublink_expr(), get_windowfunc_expr(), hash_ok_operator(), hstore_subscript_transform(), initialize_peragg(), inline_function(), internal_get_result_type(), jsonb_exec_setup(), jsonb_subscript_transform(), make_op(), make_scalar_array_op(), makeVarFromTargetEntry(), makeWholeRowVar(), match_pattern_prefix(), ordered_set_startup(), ParseFuncOrColumn(), pg_get_indexdef_worker(), pg_get_partkeydef_worker(), prepare_query_params(), preprocess_aggref(), preprocess_minmax_aggregates(), ProcedureCreate(), process_equivalence(), process_matched_tle(), recheck_cast_function_args(), relabel_to_typmod(), RelationBuildPartitionKey(), RelationGetDummyIndexExpressions(), remove_unused_subquery_outputs(), replace_nestloop_param_placeholdervar(), replace_outer_grouping(), replace_outer_placeholdervar(), resolveTargetListUnknowns(), scalararraysel(), select_common_type(), select_common_typmod(), set_append_rel_size(), set_dummy_tlist_references(), set_joinrel_partition_key_exprs(), set_pathtarget_cost_width(), set_rel_width(), show_sortorder_options(), tlist_same_datatypes(), transformAExprNullIf(), transformAggregateCall(), transformArrayExpr(), transformAssignedExpr(), transformAssignmentIndirection(), transformAssignmentSubscripts(), transformCaseExpr(), transformCollateClause(), transformExprRecurse(), transformFrameOffset(), transformFromClauseItem(), transformIndirection(), transformInsertStmt(), transformMultiAssignRef(), transformPartitionBoundValue(), transformPLAssignStmt(), transformSetOperationTree(), transformSubLink(), transformTypeCast(), unknown_attribute(), and xmlelement().
Definition at line 267 of file nodeFuncs.c.
References arg, OpExpr::args, CaseExpr::args, CoalesceExpr::args, MinMaxExpr::args, ARRAY_SUBLINK, ArrayExpr::array_typeid, Assert, CaseExpr::casetype, CoalesceExpr::coalescetype, CaseExpr::defresult, ArrayExpr::element_typeid, ArrayExpr::elements, elog, ERROR, EXPR_SUBLINK, exprIsLengthCoercion(), exprType(), exprTypmod(), SubPlan::firstColTypmod, for_each_from, IsA, lfirst, lfirst_node, linitial, linitial_node, MinMaxExpr::minmaxtype, ArrayExpr::multidims, NIL, nodeTag, CaseWhen::result, SubLink::subLinkType, SubPlan::subLinkType, AlternativeSubPlan::subplans, SubLink::subselect, T_AlternativeSubPlan, T_ArrayCoerceExpr, T_ArrayExpr, T_CaseExpr, T_CaseTestExpr, T_CoalesceExpr, T_CoerceToDomain, T_CoerceToDomainValue, T_CollateExpr, T_Const, T_FieldSelect, T_FuncExpr, T_MinMaxExpr, T_NamedArgExpr, T_NullIfExpr, T_Param, T_PlaceHolderVar, T_RelabelType, T_SetToDefault, T_SQLValueFunction, T_SubLink, T_SubPlan, T_SubscriptingRef, T_Var, and Query::targetList.
Referenced by addRangeTableEntryForFunction(), addRangeTableEntryForSubquery(), analyzeCTE(), analyzeCTETargetList(), applyRelabelType(), assign_hypothetical_collations(), build_coercion_expression(), build_subplan(), canonicalize_ec_expression(), checkRuleResultList(), coerce_type_typmod(), ConstructTupleDescriptor(), convert_EXISTS_to_ANY(), create_ctas_nodata(), DefineVirtualRelation(), eval_const_expressions_mutator(), examine_attribute(), examine_variable(), exec_save_simple_expr(), ExecTypeFromExprList(), ExecTypeFromTLInternal(), expandRecordVariable(), expandRTE(), exprTypmod(), find_placeholder_info(), generate_append_tlist(), generate_setop_tlist(), generate_subquery_params(), get_expr_result_type(), get_first_col_type(), get_rule_expr(), get_rule_expr_funccall(), interval_support(), makeVarFromTargetEntry(), numeric_support(), preprocess_aggref(), RelationBuildPartitionKey(), RelationGetDummyIndexExpressions(), remove_unused_subquery_outputs(), replace_nestloop_param_placeholdervar(), replace_outer_placeholdervar(), select_common_typmod(), set_append_rel_size(), set_dummy_tlist_references(), set_pathtarget_cost_width(), set_rel_width(), TemporalSimplify(), transformCaseExpr(), transformFromClauseItem(), transformIndirection(), transformInsertStmt(), transformMultiAssignRef(), transformPLAssignStmt(), transformSubLink(), varbit_support(), and varchar_support().
void fix_opfuncids | ( | Node * | node | ) |
Definition at line 1633 of file nodeFuncs.c.
References fix_opfuncids_walker().
Referenced by evaluate_expr(), expression_planner(), expression_planner_with_deps(), get_qual_for_range(), operator_predicate_proof(), RelationBuildPartitionKey(), RelationGetIndexExpressions(), and RelationGetIndexPredicate().
|
inlinestatic |
Definition at line 73 of file nodeFuncs.h.
References OpExpr::args, linitial, and NIL.
Referenced by addRangeClause(), ExecIndexBuildScanKeys(), final_cost_hashjoin(), initialize_mergeclause_eclasses(), make_restrictinfo_internal(), MakeTidOpExpr(), match_clause_to_ordering_op(), match_clause_to_partition_key(), match_foreign_keys_to_quals(), mergejoinscansel(), print_expr(), process_equivalence(), reconsider_full_join_clause(), reconsider_outer_join_clause(), rel_is_distinct_for(), relation_has_unique_index_for(), and TidExprListCreate().
|
inlinestatic |
Definition at line 124 of file nodeFuncs.h.
References generate_unaccent_rules::args, check_functions_in_node(), expression_tree_mutator(), expression_tree_walker(), linitial, planstate_tree_walker(), query_or_expression_tree_mutator(), query_or_expression_tree_walker(), query_tree_mutator(), query_tree_walker(), range_table_entry_walker(), range_table_mutator(), range_table_walker(), and raw_expression_tree_walker().
Referenced by clause_selectivity_ext(), dependency_is_compatible_clause(), match_boolean_index_clause(), match_boolean_partition_clause(), matches_boolean_partition_clause(), and pull_up_sublinks_qual_recurse().
|
inlinestatic |
Definition at line 85 of file nodeFuncs.h.
References OpExpr::args, list_length(), and lsecond.
Referenced by addRangeClause(), ExecIndexBuildScanKeys(), final_cost_hashjoin(), initialize_mergeclause_eclasses(), make_restrictinfo_internal(), MakeTidOpExpr(), match_clause_to_ordering_op(), match_clause_to_partition_key(), match_foreign_keys_to_quals(), mergejoinscansel(), print_expr(), process_equivalence(), reconsider_full_join_clause(), reconsider_outer_join_clause(), rel_is_distinct_for(), relation_has_unique_index_for(), and TidExprListCreate().
|
inlinestatic |
Definition at line 97 of file nodeFuncs.h.
References AND_EXPR, boolop(), and IsA.
Referenced by clause_selectivity_ext(), ExecInitSubPlan(), extract_or_clause(), find_duplicate_ors(), find_single_rel_for_clauses(), gen_partprune_steps_internal(), generate_bitmap_or_paths(), make_ands_implicit(), make_restrictinfo(), make_sub_restrictinfos(), mcv_get_match_bitmap(), predicate_classify(), process_duplicate_ors(), process_sublinks_mutator(), pull_ands(), pull_up_sublinks_qual_recurse(), simplify_and_arguments(), statext_is_compatible_clause(), statext_is_compatible_clause_internal(), testexpr_is_hashable(), and TidQualFromRestrictInfoList().
|
inlinestatic |
Definition at line 59 of file nodeFuncs.h.
References IsA.
Referenced by array_unnest_support(), clause_is_strict_for(), clause_selectivity_ext(), generate_series_int4_support(), generate_series_int8_support(), like_regex_support(), and network_subset_support().
|
inlinestatic |
Definition at line 115 of file nodeFuncs.h.
References boolop(), IsA, and NOT_EXPR.
Referenced by clause_selectivity_ext(), dependency_is_compatible_clause(), match_boolean_index_clause(), match_boolean_partition_clause(), matches_boolean_partition_clause(), mcv_get_match_bitmap(), pull_up_sublinks_qual_recurse(), and statext_is_compatible_clause_internal().
|
inlinestatic |
Definition at line 66 of file nodeFuncs.h.
References IsA.
Referenced by check_hashjoinable(), check_mergejoinable(), clause_is_strict_for(), clause_selectivity_ext(), clauselist_selectivity_ext(), CommuteOpExpr(), create_hashjoin_plan(), dependency_is_compatible_clause(), get_switched_clauses(), IsBinaryTidClause(), like_regex_support(), make_restrictinfo_internal(), match_clause_to_ordering_op(), mcv_get_match_bitmap(), mergejoinscansel(), network_subset_support(), operator_predicate_proof(), process_equivalence(), reconsider_full_join_clause(), reconsider_outer_join_clause(), statext_is_compatible_clause_internal(), and TidExprListCreate().
|
inlinestatic |
Definition at line 106 of file nodeFuncs.h.
References boolop(), IsA, and OR_EXPR.
Referenced by clause_selectivity_ext(), dependency_is_compatible_clause(), extract_or_clause(), find_duplicate_ors(), gen_partprune_steps_internal(), make_restrictinfo(), make_sub_restrictinfos(), mcv_get_match_bitmap(), predicate_classify(), process_sublinks_mutator(), pull_ors(), simplify_or_arguments(), and statext_is_compatible_clause_internal().
Definition at line 3972 of file nodeFuncs.c.
References check_stack_depth(), PlanState::initPlan, innerPlanState, lfirst, nodeTag, outerPlanState, PlanState::plan, planstate_walk_members(), planstate_walk_subplans(), PlanState::subPlan, T_Append, T_BitmapAnd, T_BitmapOr, T_CustomScan, T_MergeAppend, T_ModifyTable, and T_SubqueryScan.
Referenced by ExecParallelEstimate(), ExecParallelInitializeDSM(), ExecParallelInitializeWorker(), ExecParallelReInitializeDSM(), ExecParallelReportInstrumentation(), ExecParallelRetrieveInstrumentation(), ExecShutdownNode(), ExplainPreScanNode(), and get_notclausearg().