PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/htup_details.h"
#include "catalog/pg_aggregate.h"
#include "catalog/pg_class.h"
#include "catalog/pg_language.h"
#include "catalog/pg_operator.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
#include "executor/executor.h"
#include "executor/functions.h"
#include "funcapi.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/multibitmapset.h"
#include "nodes/nodeFuncs.h"
#include "nodes/subscripting.h"
#include "nodes/supportnodes.h"
#include "optimizer/clauses.h"
#include "optimizer/cost.h"
#include "optimizer/optimizer.h"
#include "optimizer/plancat.h"
#include "optimizer/planmain.h"
#include "parser/analyze.h"
#include "parser/parse_agg.h"
#include "parser/parse_coerce.h"
#include "parser/parse_func.h"
#include "rewrite/rewriteHandler.h"
#include "rewrite/rewriteManip.h"
#include "tcop/tcopprot.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/datum.h"
#include "utils/fmgroids.h"
#include "utils/json.h"
#include "utils/jsonb.h"
#include "utils/lsyscache.h"
#include "utils/memutils.h"
#include "utils/syscache.h"
#include "utils/typcache.h"
Go to the source code of this file.
Data Structures | |
struct | eval_const_expressions_context |
struct | substitute_actual_parameters_context |
struct | substitute_actual_srf_parameters_context |
struct | inline_error_callback_arg |
struct | max_parallel_hazard_context |
Macros | |
#define | CCDN_CASETESTEXPR_OK 0x0001 /* CaseTestExpr okay here? */ |
#define | MIN_ARRAY_SIZE_FOR_HASHED_SAOP 9 |
#define | ece_generic_processing(node) |
#define | ece_all_arguments_const(node) (!expression_tree_walker((Node *) (node), contain_non_const_walker, NULL)) |
#define | ece_evaluate_expr(node) |
#define CCDN_CASETESTEXPR_OK 0x0001 /* CaseTestExpr okay here? */ |
#define ece_all_arguments_const | ( | node | ) | (!expression_tree_walker((Node *) (node), contain_non_const_walker, NULL)) |
#define ece_evaluate_expr | ( | node | ) |
#define ece_generic_processing | ( | node | ) |
Definition at line 4219 of file clauses.c.
References generate_unaccent_rules::args, elog(), ERROR, fetch_function_defaults(), list_concat_copy(), list_delete_first_n(), list_length(), and pronargs.
Referenced by expand_function_arguments().
void CommuteOpExpr | ( | OpExpr * | clause | ) |
Definition at line 2064 of file clauses.c.
References OpExpr::args, elog(), ERROR, get_commutator(), InvalidOid, is_opclause(), linitial, list_length(), lsecond, OidIsValid, and OpExpr::opno.
Referenced by get_switched_clauses().
Definition at line 179 of file clauses.c.
References contain_agg_clause_walker().
Referenced by get_eclass_for_sort_expr(), and subquery_planner().
Definition at line 185 of file clauses.c.
References Assert(), expression_tree_walker, and IsA.
Referenced by contain_agg_clause().
Definition at line 1096 of file clauses.c.
References contain_context_dependent_node_walker().
Referenced by inline_function().
Definition at line 1106 of file clauses.c.
References ArrayCoerceExpr::arg, CaseExpr::arg, CCDN_CASETESTEXPR_OK, ArrayCoerceExpr::elemexpr, expression_tree_walker, IsA, and res.
Referenced by contain_context_dependent_node().
Definition at line 1054 of file clauses.c.
References contain_exec_param_walker().
Referenced by test_opexpr_is_hashable().
Definition at line 1060 of file clauses.c.
References expression_tree_walker, IsA, list_member_int(), PARAM_EXEC, Param::paramid, and Param::paramkind.
Referenced by contain_exec_param().
Definition at line 1180 of file clauses.c.
References contain_leaked_vars_walker().
Referenced by make_restrictinfo_internal(), and qual_is_pushdown_safe().
Definition at line 1186 of file clauses.c.
References get_func_leakproof().
Referenced by contain_leaked_vars_walker().
Definition at line 1192 of file clauses.c.
References MinMaxExpr::args, check_functions_in_node(), TypeCacheEntry::cmp_proc, contain_leaked_vars_checker(), contain_var_clause(), expression_tree_walker, SubscriptRoutines::fetch_leakproof, forthree, get_func_leakproof(), get_opcode(), getSubscriptingRoutines(), RowCompareExpr::largs, lfirst, lfirst_oid, lookup_type_cache(), nodeTag, OidIsValid, RowCompareExpr::rargs, SubscriptingRef::refassgnexpr, SubscriptRoutines::store_leakproof, and TYPECACHE_CMP_PROC.
Referenced by contain_leaked_vars().
Definition at line 367 of file clauses.c.
References contain_mutable_functions_walker().
Referenced by can_minmax_aggs(), check_index_predicates(), CheckMutability(), ComputePartitionAttrs(), cookDefault(), create_bitmap_scan_plan(), create_indexscan_plan(), eval_const_expressions_mutator(), exec_save_simple_expr(), inline_function(), is_foreign_expr(), and relation_excluded_by_constraints().
Definition at line 373 of file clauses.c.
References func_volatile().
Referenced by contain_mutable_functions_walker().
Definition at line 379 of file clauses.c.
References JsonConstructorExpr::args, check_functions_in_node(), contain_mutable_functions_checker(), expression_tree_walker, exprType(), JsonReturning::format, JsonFormat::format_type, IsA, JS_FORMAT_JSONB, lfirst, query_tree_walker, JsonConstructorExpr::returning, to_json_is_immutable(), and to_jsonb_is_immutable().
Referenced by contain_mutable_functions().
Definition at line 3629 of file clauses.c.
References expression_tree_walker, and IsA.
Definition at line 910 of file clauses.c.
References contain_nonstrict_functions_walker().
Referenced by inline_function().
Definition at line 916 of file clauses.c.
References func_strict().
Referenced by contain_nonstrict_functions_walker().
Definition at line 922 of file clauses.c.
References AND_EXPR, arg, BoolExpr::boolop, check_functions_in_node(), contain_nonstrict_functions_checker(), expression_tree_walker, SubscriptRoutines::fetch_strict, getSubscriptingRoutines(), IsA, OR_EXPR, and SubscriptingRef::refassgnexpr.
Referenced by contain_nonstrict_functions().
Definition at line 332 of file clauses.c.
References contain_subplans_walker().
Referenced by convert_EXISTS_to_ANY(), ExecInitValuesScan(), find_window_run_conditions(), initialize_peragg(), inline_function(), inline_set_returning_function(), qual_is_pushdown_safe(), and subquery_planner().
Definition at line 338 of file clauses.c.
References expression_tree_walker, and IsA.
Referenced by contain_subplans().
Definition at line 483 of file clauses.c.
References contain_volatile_functions_walker().
Referenced by AddRelationNewConstraints(), apply_child_basequals(), check_hashjoinable(), check_mergejoinable(), check_output_expressions(), compute_semijoin_info(), convert_ANY_sublink_to_join(), convert_EXISTS_sublink_to_join(), convert_EXISTS_to_ANY(), CopyFrom(), distribute_qual_to_rels(), estimate_num_groups(), ExecInitWindowAgg(), expand_indexqual_rowcompare(), find_compatible_agg(), get_eclass_for_sort_expr(), get_memoize_path(), initialize_peragg(), inline_function(), inline_set_returning_function(), is_pseudo_constant_clause(), is_pseudo_constant_clause_relids(), is_pseudo_constant_for_index(), is_safe_restriction_clause_for(), is_simple_subquery(), is_simple_values(), IsBinaryTidClause(), IsTidEqualAnyClause(), make_sort_input_target(), match_clause_to_ordering_op(), match_clause_to_partition_key(), match_opclause_to_indexcol(), match_rowcompare_to_indexcol(), match_saopclause_to_indexcol(), paraminfo_get_equal_hashops(), qual_is_pushdown_safe(), remove_unused_subquery_outputs(), SS_process_ctes(), and subquery_planner().
Definition at line 489 of file clauses.c.
References func_volatile().
Referenced by contain_volatile_functions_walker().
Definition at line 590 of file clauses.c.
References contain_volatile_functions_not_nextval_walker().
Referenced by BeginCopyFrom().
Definition at line 596 of file clauses.c.
References func_volatile().
Referenced by contain_volatile_functions_not_nextval_walker().
Definition at line 603 of file clauses.c.
References check_functions_in_node(), contain_volatile_functions_not_nextval_checker(), expression_tree_walker, IsA, and query_tree_walker.
Referenced by contain_volatile_functions_not_nextval().
Definition at line 495 of file clauses.c.
References check_functions_in_node(), RestrictInfo::clause, contain_volatile_functions_checker(), expression_tree_walker, PathTarget::exprs, PathTarget::has_volatile_expr, IsA, query_tree_walker, VOLATILITY_NOVOLATILE, and VOLATILITY_VOLATILE.
Referenced by contain_volatile_functions().
Definition at line 216 of file clauses.c.
References contain_windowfuncs().
Referenced by get_eclass_for_sort_expr().
void convert_saop_to_hashed_saop | ( | Node * | node | ) |
Definition at line 2204 of file clauses.c.
References convert_saop_to_hashed_saop_walker().
Referenced by preprocess_expression().
Definition at line 2210 of file clauses.c.
References ScalarArrayOpExpr::args, ARR_DIMS, ARR_NDIM, ArrayGetNItems(), DatumGetPointer(), expression_tree_walker, get_negator(), get_op_hash_functions(), get_opcode(), IsA, lsecond, MIN_ARRAY_SIZE_FOR_HASHED_SAOP, nitems, OidIsValid, ScalarArrayOpExpr::opno, and ScalarArrayOpExpr::useOr.
Referenced by convert_saop_to_hashed_saop().
|
static |
Definition at line 3645 of file clauses.c.
References eval_const_expressions_context::estimate, and func_volatile().
Referenced by eval_const_expressions_mutator().
Node* estimate_expression_value | ( | PlannerInfo * | root, |
Node * | node | ||
) |
Definition at line 2312 of file clauses.c.
References eval_const_expressions_context::active_fns, eval_const_expressions_context::boundParams, eval_const_expressions_context::case_val, eval_const_expressions_context::estimate, eval_const_expressions_mutator(), PlannerInfo::glob, NIL, and eval_const_expressions_context::root.
Referenced by array_unnest_support(), bernoulli_samplescangetsamplesize(), clause_selectivity_ext(), generate_series_int4_support(), generate_series_int8_support(), get_restriction_variable(), gincost_opexpr(), gincost_scalararrayopexpr(), preprocess_limit(), scalararraysel(), system_rows_samplescangetsamplesize(), system_samplescangetsamplesize(), and system_time_samplescangetsamplesize().
Node* eval_const_expressions | ( | PlannerInfo * | root, |
Node * | node | ||
) |
Definition at line 2171 of file clauses.c.
References eval_const_expressions_context::active_fns, eval_const_expressions_context::boundParams, eval_const_expressions_context::case_val, eval_const_expressions_context::estimate, eval_const_expressions_mutator(), PlannerInfo::glob, NIL, and eval_const_expressions_context::root.
Referenced by apply_child_basequals(), ATExecAttachPartition(), ConstraintImpliedByRelConstraint(), convert_EXISTS_to_ANY(), DetachAddConstraintIfNeeded(), DoCopy(), expression_planner(), expression_planner_with_deps(), fetch_statentries_for_relation(), get_proposed_default_constraint(), get_relation_constraints(), get_relation_statistics(), preprocess_expression(), preprocess_function_rtes(), process_implied_equality(), RelationBuildPartitionKey(), RelationGetIndexExpressions(), RelationGetIndexPredicate(), and simplify_EXISTS_query().
|
static |
Definition at line 2357 of file clauses.c.
References WindowFunc::aggfilter, AND_EXPR, applyRelabelType(), arg, FieldSelect::arg, RelabelType::arg, CoerceViaIO::arg, ArrayCoerceExpr::arg, ConvertRowtypeExpr::arg, CollateExpr::arg, CaseExpr::arg, NullTest::arg, BooleanTest::arg, CoerceToDomain::arg, generate_unaccent_rules::args, WindowFunc::args, FuncExpr::args, OpExpr::args, BoolExpr::args, CaseExpr::args, RowExpr::args, CoalesceExpr::args, Assert(), BoolGetDatum(), BoolExpr::boolop, BooleanTest::booltesttype, eval_const_expressions_context::boundParams, eval_const_expressions_context::case_val, castNode, COERCE_IMPLICIT_CAST, CollateExpr::collOid, Const::consttype, contain_mutable_functions(), copyObject, datumCopy(), DatumGetBool(), CaseExpr::defresult, DomainHasConstraints(), ece_all_arguments_const, ece_evaluate_expr, ece_function_is_safe(), ece_generic_processing, ArrayCoerceExpr::elemexpr, elog(), ERROR, eval_const_expressions_context::estimate, evaluate_expr(), expand_function_arguments(), CaseWhen::expr, exprCollation(), expression_tree_mutator, exprType(), exprTypmod(), FieldSelect::fieldnum, JsonValueExpr::formatted_expr, FuncExpr::funcid, get_typlenbyval(), getTypeInputInfo(), getTypeOutputInfo(), HeapTupleIsValid, if(), Int32GetDatum(), InvalidAttrNumber, InvalidOid, IS_FALSE, IS_NOT_FALSE, IS_NOT_NULL, IS_NOT_TRUE, IS_NOT_UNKNOWN, IS_NULL, IS_TRUE, IS_UNKNOWN, IsA, ParamExternData::isnull, lappend(), lfirst, lfirst_node, linitial, list_length(), list_make1, list_make3, list_nth(), Param::location, WindowFunc::location, FuncExpr::location, OpExpr::location, RelabelType::location, CoerceViaIO::location, ConvertRowtypeExpr::location, CollateExpr::location, CaseExpr::location, CaseWhen::location, CoalesceExpr::location, NullTest::location, BooleanTest::location, CoerceToDomain::location, make_andclause(), make_orclause(), makeBoolConst(), makeConst(), makeNode, makeNullConst(), makeVar(), negate_clause(), NIL, nodeTag, NOT_EXPR, NullTest::nulltesttype, ParamListInfoData::numParams, ObjectIdGetDatum(), OidIsValid, OpExpr::opno, OR_EXPR, PARAM_EXTERN, PARAM_FLAG_CONST, ParamListInfoData::paramFetch, Param::paramid, Param::paramkind, ParamListInfoData::params, Param::paramtype, ParamExternData::pflags, PROCOID, ParamExternData::ptype, record_plan_type_dependency(), ReleaseSysCache(), CaseWhen::result, RelabelType::resulttype, CoerceViaIO::resulttype, ConvertRowtypeExpr::resulttype, CoerceToDomain::resulttype, eval_const_expressions_context::root, rowtype_field_matches(), SearchSysCache1(), set_opfuncid(), set_sa_opfuncid(), simplify_and_arguments(), simplify_boolean_equality(), simplify_function(), simplify_or_arguments(), SQLValueFunction::typmod, ParamExternData::value, WindowFunc::winfnoid, and WindowFunc::winref.
Referenced by estimate_expression_value(), eval_const_expressions(), inline_function(), simplify_and_arguments(), simplify_function(), and simplify_or_arguments().
Definition at line 4866 of file clauses.c.
References CreateExecutorState(), datumCopy(), EState::es_query_cxt, ExecEvalExprSwitchContext(), ExecInitExpr(), fix_opfuncids(), FreeExecutorState(), get_typlenbyval(), GetPerTupleExprContext, makeConst(), MemoryContextSwitchTo(), PG_DETOAST_DATUM_COPY, and PointerGetDatum().
Referenced by eval_const_expressions_mutator(), evaluate_function(), and transformPartitionBoundValue().
|
static |
Definition at line 4318 of file clauses.c.
References arg, generate_unaccent_rules::args, FuncExpr::args, COERCE_EXPLICIT_CALL, eval_const_expressions_context::estimate, evaluate_expr(), FuncExpr::funcid, GETSTRUCT, IsA, lfirst, FuncExpr::location, makeNode, and makeNullConst().
Referenced by simplify_function().
List* expand_function_arguments | ( | List * | args, |
bool | include_out_arguments, | ||
Oid | result_type, | ||
HeapTuple | func_tuple | ||
) |
Definition at line 4068 of file clauses.c.
References add_function_defaults(), arg, generate_unaccent_rules::args, ARR_DATA_PTR, ARR_DIMS, ARR_ELEMTYPE, ARR_HASNULL, ARR_NDIM, Assert(), DatumGetArrayTypeP, elog(), ERROR, GETSTRUCT, IsA, lfirst, list_length(), PROCOID, pronargs, recheck_cast_function_args(), reorder_function_arguments(), and SysCacheGetAttr().
Referenced by eval_const_expressions_mutator(), simplify_function(), and transformCallStmt().
double expression_returns_set_rows | ( | PlannerInfo * | root, |
Node * | clause | ||
) |
Definition at line 291 of file clauses.c.
References clamp_row_est(), FuncExpr::funcid, get_function_rows(), IsA, and set_opfuncid().
Referenced by create_set_projection_path(), estimate_num_groups(), and set_function_size_estimates().
Definition at line 4243 of file clauses.c.
References castNode, pfree(), PROCOID, generate_unaccent_rules::str, stringToNode(), SysCacheGetAttrNotNull(), and TextDatumGetCString.
Referenced by add_function_defaults(), and reorder_function_arguments().
Definition at line 1894 of file clauses.c.
References NullTest::arg, BooleanTest::arg, BooleanTest::booltesttype, if(), IS_NULL, IS_UNKNOWN, IsA, NullTest::nulltesttype, and Var::varlevelsup.
Referenced by check_redundant_nullability_qual(), and find_forced_null_vars().
Definition at line 1833 of file clauses.c.
References AND_EXPR, BoolExpr::args, BoolExpr::boolop, find_forced_null_var(), FirstLowInvalidHeapAttributeNumber, IsA, lfirst, mbms_add_member(), mbms_add_members(), NIL, Var::varattno, and Var::varno.
Referenced by reduce_outer_joins_pass2().
Definition at line 1373 of file clauses.c.
References find_nonnullable_rels_walker().
Referenced by make_outerjoininfo(), and reduce_outer_joins_pass2().
Definition at line 1379 of file clauses.c.
References AND_EXPR, ANY_SUBLINK, RelabelType::arg, CoerceViaIO::arg, ArrayCoerceExpr::arg, ConvertRowtypeExpr::arg, CollateExpr::arg, NullTest::arg, BooleanTest::arg, FuncExpr::args, OpExpr::args, ScalarArrayOpExpr::args, BoolExpr::args, bms_add_members(), bms_int_members(), bms_is_empty, bms_join(), bms_make_singleton(), bms_membership(), BMS_SINGLETON, BoolExpr::boolop, BooleanTest::booltesttype, elog(), ERROR, func_strict(), FuncExpr::funcid, IS_FALSE, IS_NOT_NULL, IS_NOT_UNKNOWN, is_strict_saop(), IS_TRUE, IsA, lfirst, NOT_EXPR, NullTest::nulltesttype, OR_EXPR, PlaceHolderVar::phlevelsup, ROWCOMPARE_SUBLINK, set_opfuncid(), splan, Var::varlevelsup, and Var::varno.
Referenced by find_nonnullable_rels().
Definition at line 1624 of file clauses.c.
References find_nonnullable_vars_walker().
Referenced by reduce_outer_joins_pass2().
Definition at line 1630 of file clauses.c.
References AND_EXPR, ANY_SUBLINK, RelabelType::arg, CoerceViaIO::arg, ArrayCoerceExpr::arg, ConvertRowtypeExpr::arg, CollateExpr::arg, NullTest::arg, BooleanTest::arg, FuncExpr::args, OpExpr::args, ScalarArrayOpExpr::args, BoolExpr::args, BoolExpr::boolop, BooleanTest::booltesttype, elog(), ERROR, FirstLowInvalidHeapAttributeNumber, func_strict(), FuncExpr::funcid, IS_FALSE, IS_NOT_NULL, IS_NOT_UNKNOWN, is_strict_saop(), IS_TRUE, IsA, lfirst, mbms_add_member(), mbms_add_members(), mbms_int_members(), NIL, NOT_EXPR, NullTest::nulltesttype, OR_EXPR, ROWCOMPARE_SUBLINK, set_opfuncid(), splan, Var::varattno, Var::varlevelsup, and Var::varno.
Referenced by find_nonnullable_vars().
WindowFuncLists* find_window_functions | ( | Node * | clause, |
Index | maxWinRef | ||
) |
Definition at line 229 of file clauses.c.
References find_window_functions_walker(), WindowFuncLists::maxWinRef, WindowFuncLists::numWindowFuncs, palloc(), palloc0(), and WindowFuncLists::windowFuncs.
Referenced by grouping_planner().
|
static |
Definition at line 241 of file clauses.c.
References Assert(), elog(), ERROR, expression_tree_walker, IsA, lappend(), list_member(), WindowFuncLists::maxWinRef, WindowFuncLists::numWindowFuncs, WindowFuncLists::windowFuncs, and WindowFunc::winref.
Referenced by find_window_functions().
|
static |
Definition at line 4445 of file clauses.c.
References ACL_EXECUTE, ACLCHECK_OK, eval_const_expressions_context::active_fns, ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, arg, CollateExpr::arg, ErrorContextCallback::arg, generate_unaccent_rules::args, FuncExpr::args, ErrorContextCallback::callback, castNode, check_sql_fn_retval(), CMD_SELECT, COERCE_EXPLICIT_CALL, CollateExpr::collOid, contain_context_dependent_node(), contain_mutable_functions(), contain_nonstrict_functions(), contain_subplans(), contain_volatile_functions(), copyObject, cost_qual_eval(), cpu_operator_cost, CurrentMemoryContext, error_context_stack, eval_const_expressions_mutator(), exprCollation(), exprType(), FmgrHookIsNeeded, free_parsestate(), FuncExpr::funcid, get_expr_result_type(), GETSTRUCT, GetUserId(), heap_attisnull(), i, IsA, lappend_oid(), lfirst, linitial, linitial_node, list_delete_last(), list_length(), list_make1, list_member_oid(), FuncExpr::location, CollateExpr::location, make_parsestate(), makeNode, MemoryContextDelete(), MemoryContextSwitchTo(), NameStr, object_aclcheck(), OidIsValid, ParseState::p_sourcetext, palloc0(), QualCost::per_tuple, pg_parse_query(), prepare_sql_fn_parse_info(), ErrorContextCallback::previous, PROCOID, inline_error_callback_arg::proname, inline_error_callback_arg::prosrc, querytree(), record_plan_function_dependency(), eval_const_expressions_context::root, sql_fn_parser_setup(), sql_inline_error_callback(), QualCost::startup, stringToNode(), substitute_actual_parameters(), SysCacheGetAttr(), SysCacheGetAttrNotNull(), TextDatumGetCString, and transformTopLevelStmt().
Referenced by simplify_function().
Query* inline_set_returning_function | ( | PlannerInfo * | root, |
RangeTblEntry * | rte | ||
) |
Definition at line 4958 of file clauses.c.
References ACL_EXECUTE, ACLCHECK_OK, AcquireRewriteLocks(), ALLOCSET_DEFAULT_SIZES, AllocSetContextCreate, ErrorContextCallback::arg, FuncExpr::args, Assert(), BuildDescFromLists(), ErrorContextCallback::callback, castNode, check_sql_fn_retval(), check_stack_depth(), CMD_SELECT, contain_subplans(), contain_volatile_functions(), copyObject, CurrentMemoryContext, PlannerGlobal::dependsOnRole, elog(), ERROR, error_context_stack, FmgrHookIsNeeded, RangeTblFunction::funcexpr, FuncExpr::funcid, RangeTblEntry::funcordinality, RangeTblEntry::functions, get_expr_result_type(), GETSTRUCT, GetUserId(), PlannerInfo::glob, heap_attisnull(), HeapTupleIsValid, if(), IsA, linitial, linitial_node, list_length(), list_make1, MemoryContextDelete(), MemoryContextSwitchTo(), NameStr, object_aclcheck(), ObjectIdGetDatum(), pg_analyze_and_rewrite_withcb(), pg_parse_query(), pg_rewrite_query(), prepare_sql_fn_parse_info(), ErrorContextCallback::previous, PROCOID, inline_error_callback_arg::proname, inline_error_callback_arg::prosrc, querytree(), record_plan_function_dependency(), ReleaseSysCache(), RTE_FUNCTION, RangeTblEntry::rtekind, SearchSysCache1(), sql_fn_parser_setup(), sql_inline_error_callback(), stringToNode(), substitute_actual_srf_parameters(), SysCacheGetAttr(), SysCacheGetAttrNotNull(), TextDatumGetCString, TYPEFUNC_COMPOSITE, TYPEFUNC_COMPOSITE_DOMAIN, and TYPEFUNC_RECORD.
Referenced by preprocess_function_rtes().
bool is_parallel_safe | ( | PlannerInfo * | root, |
Node * | node | ||
) |
Definition at line 670 of file clauses.c.
References PlannerInfo::glob, PlannerInfo::init_plans, lfirst, list_concat(), max_parallel_hazard_context::max_hazard, max_parallel_hazard_context::max_interesting, max_parallel_hazard_walker(), PlannerGlobal::maxParallelHazard, NIL, PlannerGlobal::paramExecTypes, max_parallel_hazard_context::safe_param_ids, and SubPlan::setParam.
Referenced by apply_projection_to_path(), build_join_rel(), create_minmaxagg_path(), create_projection_path(), create_set_projection_path(), create_window_paths(), find_computable_ec_member(), grouping_planner(), make_grouping_rel(), plan_create_index_workers(), query_planner(), relation_can_be_sorted_early(), and set_rel_consider_parallel().
Definition at line 2005 of file clauses.c.
References contain_var_clause(), and contain_volatile_functions().
Referenced by clauselist_selectivity_ext(), dependency_is_compatible_clause(), dependency_is_compatible_expression(), and find_window_run_conditions().
Definition at line 2025 of file clauses.c.
References bms_is_empty, and contain_volatile_functions().
Referenced by clauselist_selectivity_ext().
|
static |
Definition at line 1943 of file clauses.c.
References ScalarArrayOpExpr::args, ARR_DIMS, ARR_NDIM, ArrayGetNItems(), Assert(), DatumGetArrayTypeP, ArrayExpr::elements, func_strict(), IsA, list_length(), lsecond, NIL, nitems, set_sa_opfuncid(), and ScalarArrayOpExpr::useOr.
Referenced by find_nonnullable_rels_walker(), and find_nonnullable_vars_walker().
char max_parallel_hazard | ( | Query * | parse | ) |
Definition at line 651 of file clauses.c.
References max_parallel_hazard_context::max_hazard, max_parallel_hazard_context::max_interesting, max_parallel_hazard_walker(), NIL, parse(), and max_parallel_hazard_context::safe_param_ids.
Referenced by standard_planner().
Definition at line 739 of file clauses.c.
References func_parallel(), and max_parallel_hazard_test().
Referenced by max_parallel_hazard_walker().
|
static |
Definition at line 711 of file clauses.c.
References Assert(), elog(), ERROR, max_parallel_hazard_context::max_hazard, and max_parallel_hazard_context::max_interesting.
Referenced by max_parallel_hazard_checker(), and max_parallel_hazard_walker().
|
static |
Definition at line 746 of file clauses.c.
References SubPlan::args, check_functions_in_node(), RestrictInfo::clause, expression_tree_walker, IsA, list_concat_copy(), list_free(), list_member_int(), max_parallel_hazard_context::max_hazard, max_parallel_hazard_checker(), max_parallel_hazard_test(), SubPlan::parallel_safe, PARAM_EXEC, PARAM_EXTERN, Param::paramid, SubPlan::paramIds, Param::paramkind, query_tree_walker, Query::rowMarks, max_parallel_hazard_context::safe_param_ids, and SubPlan::testexpr.
Referenced by is_parallel_safe(), and max_parallel_hazard().
int NumRelids | ( | PlannerInfo * | root, |
Node * | clause | ||
) |
Definition at line 2047 of file clauses.c.
References bms_del_members(), bms_free(), bms_num_members(), PlannerInfo::outer_join_rels, and pull_varnos().
Referenced by clauselist_selectivity_ext(), rowcomparesel(), and treat_as_join_clause().
Definition at line 5306 of file clauses.c.
References pull_paramids_walker().
Referenced by create_memoize_plan().
Definition at line 5316 of file clauses.c.
References bms_add_member(), expression_tree_walker, IsA, and Param::paramid.
Referenced by pull_paramids().