|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Enumerations | |
| enum | FuncDetailCode { FUNCDETAIL_NOTFOUND , FUNCDETAIL_MULTIPLE , FUNCDETAIL_NORMAL , FUNCDETAIL_PROCEDURE , FUNCDETAIL_AGGREGATE , FUNCDETAIL_WINDOWFUNC , FUNCDETAIL_COERCION } |
Functions | |
| Node * | ParseFuncOrColumn (ParseState *pstate, List *funcname, List *fargs, Node *last_srf, FuncCall *fn, bool proc_call, int location) |
| FuncDetailCode | func_get_detail (List *funcname, List *fargs, List *fargnames, int nargs, Oid *argtypes, bool expand_variadic, bool expand_defaults, bool include_out_arguments, int *fgc_flags, Oid *funcid, Oid *rettype, bool *retset, int *nvargs, Oid *vatype, Oid **true_typeids, List **argdefaults) |
| int | func_match_argtypes (int nargs, Oid *input_typeids, FuncCandidateList raw_candidates, FuncCandidateList *candidates) |
| FuncCandidateList | func_select_candidate (int nargs, Oid *input_typeids, FuncCandidateList candidates) |
| void | make_fn_arguments (ParseState *pstate, List *fargs, Oid *actual_arg_types, Oid *declared_arg_types) |
| const char * | funcname_signature_string (const char *funcname, int nargs, List *argnames, const Oid *argtypes) |
| const char * | func_signature_string (List *funcname, int nargs, List *argnames, const Oid *argtypes) |
| Oid | LookupFuncName (List *funcname, int nargs, const Oid *argtypes, bool missing_ok) |
| Oid | LookupFuncWithArgs (ObjectType objtype, ObjectWithArgs *func, bool missing_ok) |
| void | check_srf_call_placement (ParseState *pstate, Node *last_srf, int location) |
| enum FuncDetailCode |
| Enumerator | |
|---|---|
| FUNCDETAIL_NOTFOUND | |
| FUNCDETAIL_MULTIPLE | |
| FUNCDETAIL_NORMAL | |
| FUNCDETAIL_PROCEDURE | |
| FUNCDETAIL_AGGREGATE | |
| FUNCDETAIL_WINDOWFUNC | |
| FUNCDETAIL_COERCION | |
Definition at line 22 of file parse_func.h.
| void check_srf_call_placement | ( | ParseState * | pstate, |
| Node * | last_srf, | ||
| int | location | ||
| ) |
Definition at line 2636 of file parse_func.c.
References _, Assert(), ereport, err(), errcode(), errmsg(), errmsg_internal(), ERROR, EXPR_KIND_ALTER_COL_TRANSFORM, EXPR_KIND_CALL_ARGUMENT, EXPR_KIND_CHECK_CONSTRAINT, EXPR_KIND_COLUMN_DEFAULT, EXPR_KIND_COPY_WHERE, EXPR_KIND_CYCLE_MARK, EXPR_KIND_DISTINCT_ON, EXPR_KIND_DOMAIN_CHECK, EXPR_KIND_EXECUTE_PARAMETER, EXPR_KIND_FILTER, EXPR_KIND_FROM_FUNCTION, EXPR_KIND_FROM_SUBSELECT, EXPR_KIND_FUNCTION_DEFAULT, EXPR_KIND_GENERATED_COLUMN, EXPR_KIND_GROUP_BY, EXPR_KIND_HAVING, EXPR_KIND_INDEX_EXPRESSION, EXPR_KIND_INDEX_PREDICATE, EXPR_KIND_INSERT_TARGET, EXPR_KIND_JOIN_ON, EXPR_KIND_JOIN_USING, EXPR_KIND_LIMIT, EXPR_KIND_MERGE_RETURNING, EXPR_KIND_MERGE_WHEN, EXPR_KIND_NONE, EXPR_KIND_OFFSET, EXPR_KIND_ORDER_BY, EXPR_KIND_OTHER, EXPR_KIND_PARTITION_BOUND, EXPR_KIND_PARTITION_EXPRESSION, EXPR_KIND_POLICY, EXPR_KIND_RETURNING, EXPR_KIND_SELECT_TARGET, EXPR_KIND_STATS_EXPRESSION, EXPR_KIND_TRIGGER_WHEN, EXPR_KIND_UPDATE_SOURCE, EXPR_KIND_UPDATE_TARGET, EXPR_KIND_VALUES, EXPR_KIND_VALUES_SINGLE, EXPR_KIND_WHERE, EXPR_KIND_WINDOW_FRAME_GROUPS, EXPR_KIND_WINDOW_FRAME_RANGE, EXPR_KIND_WINDOW_FRAME_ROWS, EXPR_KIND_WINDOW_ORDER, EXPR_KIND_WINDOW_PARTITION, exprLocation(), ParseState::p_expr_kind, ParseState::p_hasTargetSRFs, ParseState::p_last_srf, ParseExprKindName(), and parser_errposition().
Referenced by make_op(), and ParseFuncOrColumn().
| FuncDetailCode func_get_detail | ( | List * | funcname, |
| List * | fargs, | ||
| List * | fargnames, | ||
| int | nargs, | ||
| Oid * | argtypes, | ||
| bool | expand_variadic, | ||
| bool | expand_defaults, | ||
| bool | include_out_arguments, | ||
| int * | fgc_flags, | ||
| Oid * | funcid, | ||
| Oid * | rettype, | ||
| bool * | retset, | ||
| int * | nvargs, | ||
| Oid * | vatype, | ||
| Oid ** | true_typeids, | ||
| List ** | argdefaults | ||
| ) |
Definition at line 1513 of file parse_func.c.
References NamedArgExpr::argnumber, _FuncCandidateList::argnumbers, _FuncCandidateList::args, Assert(), bms_add_member(), bms_free(), bms_is_member(), castNode, COERCION_EXPLICIT, COERCION_PATH_COERCEVIAIO, COERCION_PATH_RELABELTYPE, elog, ERROR, FGC_VARIADIC_FAIL, find_coercion_pathway(), func_match_argtypes(), func_select_candidate(), FUNCDETAIL_AGGREGATE, FUNCDETAIL_COERCION, FUNCDETAIL_MULTIPLE, FUNCDETAIL_NORMAL, FUNCDETAIL_NOTFOUND, FUNCDETAIL_PROCEDURE, FUNCDETAIL_WINDOWFUNC, funcname, FuncNameAsType(), FuncnameGetCandidates(), GETSTRUCT(), HeapTupleIsValid, i, InvalidOid, IsA, ISCOMPLEX, lappend(), lfirst, linitial, list_delete_first_n(), list_length(), _FuncCandidateList::nargs, _FuncCandidateList::ndargs, _FuncCandidateList::next, NIL, _FuncCandidateList::nominalnargs, _FuncCandidateList::nvargs, ObjectIdGetDatum(), _FuncCandidateList::oid, OidIsValid, pfree(), ReleaseSysCache(), SearchSysCache1(), str, stringToNode(), SysCacheGetAttrNotNull(), TextDatumGetCString, and TypeCategory().
Referenced by generate_function_name(), lookup_agg_function(), and ParseFuncOrColumn().
| int func_match_argtypes | ( | int | nargs, |
| Oid * | input_typeids, | ||
| FuncCandidateList | raw_candidates, | ||
| FuncCandidateList * | candidates | ||
| ) |
Definition at line 1036 of file parse_func.c.
References _FuncCandidateList::args, can_coerce_type(), COERCION_IMPLICIT, and _FuncCandidateList::next.
Referenced by func_get_detail(), and oper_select_candidate().
| FuncCandidateList func_select_candidate | ( | int | nargs, |
| Oid * | input_typeids, | ||
| FuncCandidateList | candidates | ||
| ) |
Definition at line 1121 of file parse_func.c.
References _FuncCandidateList::args, can_coerce_type(), COERCION_IMPLICIT, ereport, errcode(), errmsg_plural(), ERROR, FUNC_MAX_ARGS, get_type_category_preferred(), getBaseType(), i, IsPreferredType(), _FuncCandidateList::next, and TypeCategory().
Referenced by func_get_detail(), and oper_select_candidate().
| const char * func_signature_string | ( | List * | funcname, |
| int | nargs, | ||
| List * | argnames, | ||
| const Oid * | argtypes | ||
| ) |
Definition at line 2153 of file parse_func.c.
References funcname, funcname_signature_string(), and NameListToString().
Referenced by findRangeCanonicalFunction(), findRangeSubtypeDiffFunction(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeSubscriptingFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), get_ts_parser_func(), get_ts_template_func(), interpret_func_support(), lookup_agg_function(), LookupFuncName(), LookupFuncWithArgs(), and ParseFuncOrColumn().
| const char * funcname_signature_string | ( | const char * | funcname, |
| int | nargs, | ||
| List * | argnames, | ||
| const Oid * | argtypes | ||
| ) |
Definition at line 2116 of file parse_func.c.
References appendStringInfo(), appendStringInfoChar(), appendStringInfoString(), StringInfoData::data, format_type_be(), funcname, i, initStringInfo(), lfirst, list_head(), list_length(), and lnext().
Referenced by func_signature_string(), and IsThereFunctionInNamespace().
Definition at line 2269 of file parse_func.c.
References ereport, errcode(), errhint(), errmsg(), ERROR, func_signature_string(), FUNCLOOKUP_AMBIGUOUS, FUNCLOOKUP_NOSUCHFUNC, funcname, InvalidOid, LookupFuncNameInternal(), NameListToString(), NIL, OBJECT_FUNCTION, and OidIsValid.
Referenced by call_pltcl_start_proc(), CreateConversionCommand(), CreateEventTrigger(), CreateProceduralLanguage(), CreateTriggerFiringOn(), DefineOperator(), findRangeCanonicalFunction(), findRangeSubtypeDiffFunction(), findTypeAnalyzeFunction(), findTypeInputFunction(), findTypeOutputFunction(), findTypeReceiveFunction(), findTypeSendFunction(), findTypeSubscriptingFunction(), findTypeTypmodinFunction(), findTypeTypmodoutFunction(), get_ts_parser_func(), get_ts_template_func(), interpret_func_support(), lookup_am_handler_func(), lookup_fdw_handler_func(), lookup_fdw_validator_func(), transformRangeTableSample(), ValidateJoinEstimator(), and ValidateRestrictionEstimator().
| Oid LookupFuncWithArgs | ( | ObjectType | objtype, |
| ObjectWithArgs * | func, | ||
| bool | missing_ok | ||
| ) |
Definition at line 2331 of file parse_func.c.
References ObjectWithArgs::args_unspecified, Assert(), ereport, errcode(), errhint(), errmsg(), errmsg_plural(), ERROR, FUNC_MAX_ARGS, FUNC_PARAM_DEFAULT, func_signature_string(), FUNCLOOKUP_AMBIGUOUS, FUNCLOOKUP_NOSUCHFUNC, get_func_prokind(), i, InvalidOid, lfirst_node, list_length(), LookupFuncNameInternal(), LookupTypeNameOid(), FunctionParameter::mode, NameListToString(), NIL, ObjectWithArgs::objargs, OBJECT_AGGREGATE, OBJECT_FUNCTION, OBJECT_PROCEDURE, OBJECT_ROUTINE, ObjectWithArgs::objfuncargs, ObjectWithArgs::objname, and OidIsValid.
Referenced by AlterFunction(), AlterOpFamilyAdd(), CreateCast(), CreateTransform(), DefineOpClass(), and get_object_address().
| void make_fn_arguments | ( | ParseState * | pstate, |
| List * | fargs, | ||
| Oid * | actual_arg_types, | ||
| Oid * | declared_arg_types | ||
| ) |
Definition at line 1948 of file parse_func.c.
References NamedArgExpr::arg, COERCE_IMPLICIT_CAST, coerce_type(), COERCION_IMPLICIT, i, IsA, and lfirst.
Referenced by make_op(), make_scalar_array_op(), ParseFuncOrColumn(), and recheck_cast_function_args().
| Node * ParseFuncOrColumn | ( | ParseState * | pstate, |
| List * | funcname, | ||
| List * | fargs, | ||
| Node * | last_srf, | ||
| FuncCall * | fn, | ||
| bool | proc_call, | ||
| int | location | ||
| ) |
Definition at line 92 of file parse_func.c.
References Aggref::aggfilter, WindowFunc::aggfilter, Aggref::aggfnoid, AGGSPLIT_SIMPLE, arg, WindowFunc::args, FuncExpr::args, Assert(), cancel_parser_errposition_callback(), check_srf_call_placement(), COERCE_EXPLICIT_CALL, coerce_type(), COERCION_EXPLICIT, elog, enforce_generic_type_consistency(), ereport, errcode(), errdetail(), errhint(), errhint_plural(), errmsg(), errmsg_plural(), ERROR, EXPR_KIND_FILTER, exprLocation(), exprType(), fn(), foreach_delete_current, format_type_be(), func_get_detail(), func_lookup_failure_details(), FUNC_MAX_ARGS, func_signature_string(), FUNCDETAIL_AGGREGATE, FUNCDETAIL_COERCION, FUNCDETAIL_MULTIPLE, FUNCDETAIL_NORMAL, FUNCDETAIL_PROCEDURE, FUNCDETAIL_WINDOWFUNC, FuncExpr::funcid, funcname, get_array_type(), get_base_element_type(), GETSTRUCT(), HeapTupleIsValid, WindowFunc::ignore_nulls, InvalidOid, IsA, ISCOMPLEX, lappend(), lfirst, linitial, list_copy_tail(), list_length(), list_truncate(), llast, Aggref::location, WindowFunc::location, FuncExpr::location, NamedArgExpr::location, ArrayExpr::location, make_fn_arguments(), makeNode, NameListToString(), NIL, NO_NULLTREATMENT, ObjectIdGetDatum(), OidIsValid, ParseState::p_last_srf, ParseComplexProjection(), parser_errposition(), pronargs, ReleaseSysCache(), SearchSysCache1(), setup_parser_errposition_callback(), strVal, transformAggregateCall(), transformWhereClause(), transformWindowFuncCall(), unify_hypothetical_args(), and WindowFunc::winfnoid.
Referenced by sql_fn_post_column_ref(), transformCallStmt(), transformColumnRef(), transformFuncCall(), and transformIndirection().