PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/detoast.h"
#include "catalog/pg_language.h"
#include "catalog/pg_proc.h"
#include "catalog/pg_type.h"
#include "executor/functions.h"
#include "lib/stringinfo.h"
#include "miscadmin.h"
#include "nodes/makefuncs.h"
#include "nodes/miscnodes.h"
#include "nodes/nodeFuncs.h"
#include "pgstat.h"
#include "utils/acl.h"
#include "utils/builtins.h"
#include "utils/fmgrtab.h"
#include "utils/guc.h"
#include "utils/lsyscache.h"
#include "utils/syscache.h"
Go to the source code of this file.
Data Structures | |
struct | CFuncHashTabEntry |
struct | fmgr_security_definer_cache |
Variables | |
PGDLLIMPORT needs_fmgr_hook_type | needs_fmgr_hook = NULL |
PGDLLIMPORT fmgr_hook_type | fmgr_hook = NULL |
static HTAB * | CFuncHash = NULL |
Datum CallerFInfoFunctionCall1 | ( | PGFunction | func, |
FmgrInfo * | flinfo, | ||
Oid | collation, | ||
Datum | arg1 | ||
) |
Definition at line 1065 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, InitFunctionCallInfoData, and LOCAL_FCINFO.
Datum CallerFInfoFunctionCall2 | ( | PGFunction | func, |
FmgrInfo * | flinfo, | ||
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2 | ||
) |
Definition at line 1085 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by gbt_enumge(), gbt_enumgt(), gbt_enumkey_cmp(), gbt_enumle(), gbt_enumlt(), gin_btree_compare_prefix(), and gin_enum_cmp().
Definition at line 2145 of file fmgr.c.
References ACL_EXECUTE, ACL_USAGE, aclcheck_error(), ACLCHECK_OK, elog, ereport, errcode(), errmsg(), ERROR, GETSTRUCT(), GetUserId(), HeapTupleIsValid, NameStr, object_aclcheck(), OBJECT_FUNCTION, OBJECT_LANGUAGE, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by fmgr_c_validator(), fmgr_internal_validator(), fmgr_sql_validator(), plperl_validator(), plpgsql_validator(), and plpython3_validator().
Datum DirectFunctionCall1Coll | ( | PGFunction | func, |
Oid | collation, | ||
Datum | arg1 | ||
) |
Definition at line 792 of file fmgr.c.
References elog, ERROR, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by Generic_Text_IC_like(), libpqrcv_create_slot(), and texthashfast().
Datum DirectFunctionCall2Coll | ( | PGFunction | func, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2 | ||
) |
Definition at line 812 of file fmgr.c.
References elog, ERROR, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by gbt_bpcharcmp(), gbt_bpchareq(), gbt_bpcharge(), gbt_bpchargt(), gbt_bpcharle(), gbt_bpcharlt(), gbt_textcmp(), gbt_texteq(), gbt_textge(), gbt_textgt(), gbt_textle(), gbt_textlt(), spg_text_leaf_consistent(), t_starts_with(), text_isequal(), and texteqfast().
Datum DirectFunctionCall3Coll | ( | PGFunction | func, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3 | ||
) |
Definition at line 834 of file fmgr.c.
References elog, ERROR, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by execute_extension_script().
Datum DirectFunctionCall4Coll | ( | PGFunction | func, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4 | ||
) |
Definition at line 859 of file fmgr.c.
References elog, ERROR, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by execute_extension_script().
Datum DirectFunctionCall5Coll | ( | PGFunction | func, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5 | ||
) |
Definition at line 886 of file fmgr.c.
References elog, ERROR, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by neqjoinsel().
Datum DirectFunctionCall6Coll | ( | PGFunction | func, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6 | ||
) |
Definition at line 915 of file fmgr.c.
References elog, ERROR, InitFunctionCallInfoData, and LOCAL_FCINFO.
Datum DirectFunctionCall7Coll | ( | PGFunction | func, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6, | ||
Datum | arg7 | ||
) |
Definition at line 947 of file fmgr.c.
References elog, ERROR, InitFunctionCallInfoData, and LOCAL_FCINFO.
Datum DirectFunctionCall8Coll | ( | PGFunction | func, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6, | ||
Datum | arg7, | ||
Datum | arg8 | ||
) |
Definition at line 981 of file fmgr.c.
References elog, ERROR, InitFunctionCallInfoData, and LOCAL_FCINFO.
Datum DirectFunctionCall9Coll | ( | PGFunction | func, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6, | ||
Datum | arg7, | ||
Datum | arg8, | ||
Datum | arg9 | ||
) |
Definition at line 1017 of file fmgr.c.
References elog, ERROR, InitFunctionCallInfoData, and LOCAL_FCINFO.
bool DirectInputFunctionCallSafe | ( | PGFunction | func, |
char * | str, | ||
Oid | typioparam, | ||
int32 | typmod, | ||
fmNodePtr | escontext, | ||
Datum * | result | ||
) |
Definition at line 1640 of file fmgr.c.
References CStringGetDatum(), elog, ERROR, InitFunctionCallInfoData, Int32GetDatum(), InvalidOid, LOCAL_FCINFO, ObjectIdGetDatum(), SOFT_ERROR_OCCURRED, and str.
Referenced by executeItemOptUnwrapTarget(), jsonb_in_scalar(), parseNumericOid(), to_regclass(), to_regcollation(), to_regnamespace(), to_regoper(), to_regoperator(), to_regproc(), to_regprocedure(), to_regrole(), and to_regtype().
const Pg_finfo_record * fetch_finfo_record | ( | void * | filehandle, |
const char * | funcname | ||
) |
Definition at line 455 of file fmgr.c.
References Pg_finfo_record::api_version, elog, ereport, errcode(), errhint(), errmsg(), ERROR, funcname, lookup_external_function(), pfree(), and psprintf().
Referenced by fmgr_c_validator(), and fmgr_info_C_lang().
Definition at line 1816 of file fmgr.c.
References palloc(), and PointerGetDatum().
Referenced by assign_random_seed(), compute_range_stats(), executeItemOptUnwrapTarget(), FillXLogStatsRow(), float8_lerp(), gbt_num_fetch(), hash_metapage_info(), index_store_float8_orderby_distances(), int8_to_char(), interval_avg(), leftmostvalue_float8(), normal_rand(), pg_buffercache_summary(), pg_stat_get_wal(), pg_stat_io_build_tuples(), pg_stats_ext_mcvlist_items(), pgstathashindex(), pgstattuple_approx_internal(), spg_kd_picksplit(), and SV_to_JsonbValue().
Definition at line 127 of file fmgr.c.
References CurrentMemoryContext, and fmgr_info_cxt_security().
Referenced by _bt_compare_array_scankey_args(), _bt_find_extreme_element(), _sv_to_datum_finfo(), attribute_statistics_update(), BeginCopyFrom(), brin_minmax_multi_summary_out(), brin_page_items(), build_pertrans_for_aggref(), call_pltcl_start_proc(), CompareOpclassOptions(), compute_distinct_stats(), create_foreign_modify(), DoCopyTo(), eqjoinsel_inner(), eqjoinsel_semi(), EventTriggerInvoke(), ExecBuildGroupingEqual(), ExecBuildHash32Expr(), ExecBuildParamSetEqual(), ExecCallTriggerFunc(), ExecEvalHashedScalarArrayOp(), ExecInitAgg(), ExecInitExprRec(), ExecInitFunc(), ExecInitHashJoin(), ExecInitJsonExpr(), ExecInitMemoize(), ExecInitSubPlan(), ExecInitTableFuncScan(), ExecInitWindowAgg(), execTuplesHashPrepare(), ExecuteCallStmt(), fetch_fp_info(), generic_restriction_selectivity(), get_stats_slot_range(), gincost_pattern(), hash_array(), inet_mcv_join_sel(), initialize_peragg(), match_pattern_prefix(), mcv_get_match_bitmap(), networkjoinsel_semi(), networksel(), OidFunctionCall0Coll(), OidFunctionCall1Coll(), OidFunctionCall2Coll(), OidFunctionCall3Coll(), OidFunctionCall4Coll(), OidFunctionCall5Coll(), OidFunctionCall6Coll(), OidFunctionCall7Coll(), OidFunctionCall8Coll(), OidFunctionCall9Coll(), OidInputFunctionCall(), OidOutputFunctionCall(), OidReceiveFunctionCall(), OidSendFunctionCall(), patternsel_common(), pg_get_catalog_foreign_keys(), pg_stats_ext_mcvlist_items(), plperl_ref_from_pg_array(), prefix_selectivity(), prepare_query_params(), printtup_prepare_info(), scalararraysel(), scalarineqsel(), ScanKeyEntryInitialize(), ScanKeyInit(), serialize_prepare_info(), text_format(), TupleDescGetAttInMetadata(), and var_eq_const().
Definition at line 349 of file fmgr.c.
References Pg_finfo_record::api_version, elog, ERROR, fetch_finfo_record(), FmgrInfo::fn_addr, CFuncHashTabEntry::inforec, load_external_function(), lookup_C_func(), pfree(), record_C_func(), SysCacheGetAttrNotNull(), TextDatumGetCString, and CFuncHashTabEntry::user_fn.
Referenced by fmgr_info_cxt_security().
void fmgr_info_copy | ( | FmgrInfo * | dstinfo, |
FmgrInfo * | srcinfo, | ||
MemoryContext | destcxt | ||
) |
Definition at line 580 of file fmgr.c.
References FmgrInfo::fn_extra, and FmgrInfo::fn_mcxt.
Referenced by bloom_get_procinfo(), bringetbitmap(), find_partition_scheme(), gistrescan(), inclusion_get_procinfo(), initBloomState(), initGinState(), initGISTstate(), minmax_multi_get_procinfo(), perform_pruning_base_step(), satisfies_hash_partition(), ScanKeyEntryInitializeWithInfo(), and spgbeginscan().
void fmgr_info_cxt | ( | Oid | functionId, |
FmgrInfo * | finfo, | ||
MemoryContext | mcxt | ||
) |
Definition at line 137 of file fmgr.c.
References fmgr_info_cxt_security().
Referenced by _bt_merge_arrays(), _bt_setup_array_cmp(), array_agg_deserialize(), array_agg_serialize(), array_in(), array_out(), array_position_common(), array_positions(), array_recv(), array_send(), array_to_text_internal(), build_concat_foutcache(), CatalogCacheInitializeCache(), compile_plperl_function(), compile_pltcl_function(), domain_state_setup(), ExecInitWindowAgg(), get_multirange_io_data(), get_range_io_data(), hstore_from_record(), hstore_populate_record(), inclusion_get_strategy_procinfo(), index_getprocinfo(), init_sexpr(), InitializeClientEncoding(), InitializeRelfilenumberMap(), load_rangetype_info(), lookup_ts_dictionary_cache(), lookup_ts_parser_cache(), lookup_type_cache(), minmax_get_strategy_procinfo(), minmax_multi_get_strategy_procinfo(), mode_final(), perform_pruning_base_step(), pg_input_is_valid_common(), plperl_spi_prepare(), plsample_func_handler(), pltcl_SPI_prepare(), PLy_input_setup_func(), PLy_output_setup_func(), PLyUnicode_ToComposite(), prepare_column_cache(), PrepareClientEncoding(), preparePresortedCols(), PrepareSortSupportComparisonShim(), record_in(), record_out(), record_recv(), record_send(), RelationBuildPartitionKey(), and ri_HashCompareOp().
|
static |
Definition at line 147 of file fmgr.c.
References elog, ereport, errcode(), errmsg(), ERROR, fmgr_info_C_lang(), fmgr_info_other_lang(), fmgr_isbuiltin(), fmgr_lookupByName(), fmgr_security_definer(), fmgr_sql(), FmgrHookIsNeeded, FmgrInfo::fn_addr, FmgrInfo::fn_expr, FmgrInfo::fn_extra, FmgrInfo::fn_mcxt, FmgrInfo::fn_nargs, FmgrInfo::fn_oid, FmgrInfo::fn_retset, FmgrInfo::fn_stats, FmgrInfo::fn_strict, FmgrBuiltin::func, GETSTRUCT(), heap_attisnull(), HeapTupleIsValid, InvalidOid, FmgrBuiltin::nargs, ObjectIdGetDatum(), pfree(), ReleaseSysCache(), FmgrBuiltin::retset, SearchSysCache1(), FmgrBuiltin::strict, SysCacheGetAttrNotNull(), TextDatumGetCString, TRACK_FUNC_ALL, TRACK_FUNC_OFF, and TRACK_FUNC_PL.
Referenced by fmgr_info(), fmgr_info_cxt(), fmgr_info_other_lang(), and fmgr_security_definer().
|
static |
Definition at line 418 of file fmgr.c.
References CurrentMemoryContext, elog, ERROR, fmgr_info_cxt_security(), FmgrInfo::fn_addr, GETSTRUCT(), HeapTupleIsValid, ObjectIdGetDatum(), ReleaseSysCache(), and SearchSysCache1().
Referenced by fmgr_info_cxt_security().
Oid fmgr_internal_function | ( | const char * | proname | ) |
Definition at line 595 of file fmgr.c.
References fmgr_lookupByName(), FmgrBuiltin::foid, InvalidOid, and proname.
Referenced by fmgr_internal_validator().
|
static |
Definition at line 76 of file fmgr.c.
References fmgr_builtin_oid_index, fmgr_builtins, fmgr_last_builtin_oid, and InvalidOidBuiltinMapping.
Referenced by fmgr_info_cxt_security().
|
static |
Definition at line 101 of file fmgr.c.
References fmgr_builtins, fmgr_nbuiltins, i, and name.
Referenced by fmgr_info_cxt_security(), and fmgr_internal_function().
Datum fmgr_security_definer | ( | PG_FUNCTION_ARGS | ) |
Definition at line 632 of file fmgr.c.
References generate_unaccent_rules::action, fmgr_security_definer_cache::arg, AtEOXact_GUC(), fmgr_security_definer_cache::configHandles, fmgr_security_definer_cache::configNames, fmgr_security_definer_cache::configValues, DatumGetArrayTypeP, elog, ERROR, ExprMultipleResult, FHET_ABORT, FHET_END, FHET_START, fmgr_security_definer_cache::flinfo, fmgr_hook, fmgr_info_cxt_security(), FmgrInfo::fn_expr, FmgrInfo::fn_extra, FmgrInfo::fn_mcxt, forthree, FunctionCallInvoke, get_config_handle(), GETSTRUCT(), GetUserId(), GetUserIdAndSecContext(), GUC_ACTION_SAVE, HeapTupleIsValid, IsA, lappend(), lfirst, MemoryContextAllocZero(), MemoryContextSwitchTo(), name, NewGUCNestLevel(), NIL, ObjectIdGetDatum(), OidIsValid, PG_CATCH, PG_END_TRY, PG_RE_THROW, PG_TRY, PGC_S_SESSION, PGC_SUSET, PGC_USERSET, pgstat_end_function_usage(), pgstat_init_function_usage(), ReleaseSysCache(), SearchSysCache1(), SECURITY_LOCAL_USERID_CHANGE, set_config_with_handle(), SetUserIdAndSecContext(), source, superuser(), SysCacheGetAttr(), TransformGUCArray(), fmgr_security_definer_cache::userid, and value.
Referenced by fmgr_info_cxt_security().
void fmgr_symbol | ( | Oid | functionId, |
char ** | mod, | ||
char ** | fn | ||
) |
Definition at line 281 of file fmgr.c.
References elog, ERROR, FmgrHookIsNeeded, fn(), GETSTRUCT(), heap_attisnull(), HeapTupleIsValid, ObjectIdGetDatum(), pstrdup(), ReleaseSysCache(), SearchSysCache1(), SysCacheGetAttrNotNull(), and TextDatumGetCString.
Referenced by llvm_function_reference().
Definition at line 1112 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by OidFunctionCall0Coll().
Definition at line 1129 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by _hash_datum2hashkey(), brin_bloom_add_value(), brin_bloom_consistent(), brin_inclusion_add_value(), element_hash(), ExecHashBuildSkewHash(), gistCompressValues(), gistdentryinit(), gistFetchAtt(), hash_multirange(), hash_range(), MemoizeHash_hash(), OidFunctionCall1Coll(), signValue(), and spgdoinsert().
Definition at line 1149 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by _bt_check_compare(), _bt_check_rowcompare(), _bt_compare(), _bt_compare_array_elements(), _bt_compare_array_skey(), _bt_compare_scankey_args(), _bt_find_extreme_element(), _bt_keep_natts(), _hash_checkqual(), array_position_common(), array_positions(), AssertCheckExpandedRanges(), AssertCheckRanges(), brin_inclusion_add_value(), brin_inclusion_consistent(), brin_inclusion_union(), brin_minmax_add_value(), brin_minmax_consistent(), brin_minmax_multi_consistent(), brin_minmax_union(), build_distances(), call_subtype_diff(), cmpEntries(), compare_expanded_ranges(), compare_values(), CompareOpclassOptions(), compute_distinct_stats(), compute_partition_hash_value(), compute_range_stats(), create_range_bounds(), doPickSplit(), element_compare(), ExecEvalPreOrderedDistinctSingle(), execTuplesUnequal(), genericPickSplit(), get_distance(), get_partition_for_tuple(), get_position(), get_stats_slot_range(), ginCompareEntries(), gistMakeUnionItVec(), gistMakeUnionKey(), gistUserPicksplit(), has_matching_range(), hash_multirange_extended(), hash_range_extended(), HeapKeyTest(), ineq_histogram_selectivity(), make_greater_string(), mcv_get_match_bitmap(), merge_list_bounds(), merge_overlapping_ranges(), mode_final(), multirange_elem_bsearch_comparison(), OidFunctionCall2Coll(), partition_list_bsearch(), partition_rbound_cmp(), partition_rbound_datum_cmp(), process_ordered_aggregate_single(), qsort_partition_list_value_cmp(), range_cmp_bound_values(), range_cmp_bounds(), range_contains_elem_internal(), range_contains_value(), ri_CompareWithCast(), satisfies_hash_partition(), spgdoinsert(), spgGetCache(), spgInnerTest(), spgLeafTest(), and tuples_equal().
Definition at line 1171 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by bringetbitmap(), ginExtractEntries(), gistKeyIsEQ(), gistpenalty(), OidFunctionCall3Coll(), and union_tuples().
Datum FunctionCall4Coll | ( | FmgrInfo * | flinfo, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4 | ||
) |
Definition at line 1196 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by add_values_to_range(), bringetbitmap(), collectMatchBitmap(), matchPartialInPendingList(), OidFunctionCall4Coll(), and scalararraysel().
Datum FunctionCall5Coll | ( | FmgrInfo * | flinfo, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5 | ||
) |
Definition at line 1223 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by gistindex_keytest(), OidFunctionCall5Coll(), scalararraysel(), update_frameheadpos(), and update_frametailpos().
Datum FunctionCall6Coll | ( | FmgrInfo * | flinfo, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6 | ||
) |
Definition at line 1252 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by OidFunctionCall6Coll().
Datum FunctionCall7Coll | ( | FmgrInfo * | flinfo, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6, | ||
Datum | arg7 | ||
) |
Definition at line 1284 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by directTriConsistentFn(), gincost_pattern(), OidFunctionCall7Coll(), and shimBoolConsistentFn().
Datum FunctionCall8Coll | ( | FmgrInfo * | flinfo, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6, | ||
Datum | arg7, | ||
Datum | arg8 | ||
) |
Definition at line 1318 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by directBoolConsistentFn(), and OidFunctionCall8Coll().
Datum FunctionCall9Coll | ( | FmgrInfo * | flinfo, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6, | ||
Datum | arg7, | ||
Datum | arg8, | ||
Datum | arg9 | ||
) |
Definition at line 1354 of file fmgr.c.
References elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FunctionCallInvoke, InitFunctionCallInfoData, and LOCAL_FCINFO.
Referenced by OidFunctionCall9Coll().
bool get_call_expr_arg_stable | ( | Node * | expr, |
int | argnum | ||
) |
Definition at line 1994 of file fmgr.c.
References arg, generate_unaccent_rules::args, IsA, list_length(), list_nth(), and PARAM_EXTERN.
Referenced by get_fn_expr_arg_stable().
Definition at line 1929 of file fmgr.c.
References generate_unaccent_rules::args, exprType(), get_base_element_type(), InvalidOid, IsA, list_length(), and list_nth().
Referenced by get_fn_expr_argtype(), plpgsql_resolve_polymorphic_argtypes(), prepare_sql_fn_parse_info(), resolve_polymorphic_argtypes(), and resolve_polymorphic_tupdesc().
bool get_fn_expr_arg_stable | ( | FmgrInfo * | flinfo, |
int | argnum | ||
) |
Definition at line 1975 of file fmgr.c.
References FmgrInfo::fn_expr, and get_call_expr_arg_stable().
Referenced by extract_variadic_args(), leadlag_common(), pg_input_is_valid_common(), and window_nth_value().
Definition at line 1910 of file fmgr.c.
References FmgrInfo::fn_expr, get_call_expr_argtype(), and InvalidOid.
Referenced by array_agg_array_transfn(), array_agg_transfn(), array_fill(), array_fill_with_lower_bounds(), build_concat_foutcache(), concat_internal(), count_nulls(), dblink_close(), dblink_exec(), dblink_fetch(), dblink_open(), dblink_record_internal(), enum_first(), enum_last(), enum_range_all(), enum_range_bounds(), extract_variadic_args(), fetch_array_arg_replace_nulls(), get_record_type_from_argument(), hstore_from_record(), hstore_populate_record(), hypothetical_check_argtypes(), json_agg_transfn_worker(), json_object_agg_transfn_worker(), jsonb_agg_transfn_worker(), jsonb_object_agg_transfn_worker(), multirange_agg_transfn(), multirange_intersect_agg_transfn(), pg_collation_for(), pg_column_compression(), pg_column_size(), pg_column_toast_chunk_id(), pg_typeof(), range_agg_transfn(), range_intersect_agg_transfn(), satisfies_hash_partition(), text_format(), to_json(), and to_jsonb().
Definition at line 1888 of file fmgr.c.
References exprType(), FmgrInfo::fn_expr, and InvalidOid.
Referenced by do_compile(), multirange_constructor0(), multirange_constructor1(), multirange_constructor2(), range_agg_finalfn(), range_constructor2(), and range_constructor3().
bool get_fn_expr_variadic | ( | FmgrInfo * | flinfo | ) |
Definition at line 2044 of file fmgr.c.
References FmgrInfo::fn_expr, and IsA.
Referenced by concat_internal(), count_nulls(), extract_variadic_args(), satisfies_hash_partition(), and text_format().
Definition at line 2097 of file fmgr.c.
References Const::consttype, DatumGetByteaP, ereport, errcode(), errmsg(), ERROR, FmgrInfo::fn_expr, if(), and IsA.
bool has_fn_opclass_options | ( | FmgrInfo * | flinfo | ) |
Definition at line 2081 of file fmgr.c.
References Const::consttype, FmgrInfo::fn_expr, if(), and IsA.
Definition at line 1530 of file fmgr.c.
References CStringGetDatum(), elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FmgrInfo::fn_strict, FunctionCallInvoke, InitFunctionCallInfoData, Int32GetDatum(), InvalidOid, LOCAL_FCINFO, ObjectIdGetDatum(), and str.
Referenced by BuildTupleFromCStrings(), hstore_populate_record(), make_tuple_from_result_row(), OidInputFunctionCall(), plperl_sv_to_datum(), plsample_func_handler(), pltcl_func_handler(), pltcl_returnnext(), pltcl_SPI_execute_plan(), PLyObject_ToScalar(), PLyUnicode_ToComposite(), and XmlTableGetValue().
bool InputFunctionCallSafe | ( | FmgrInfo * | flinfo, |
char * | str, | ||
Oid | typioparam, | ||
int32 | typmod, | ||
fmNodePtr | escontext, | ||
Datum * | result | ||
) |
Definition at line 1585 of file fmgr.c.
References CStringGetDatum(), elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FmgrInfo::fn_strict, FunctionCallInvoke, InitFunctionCallInfoData, Int32GetDatum(), InvalidOid, LOCAL_FCINFO, ObjectIdGetDatum(), SOFT_ERROR_OCCURRED, and str.
Referenced by domain_in(), multirange_in(), NextCopyFrom(), pg_input_is_valid_common(), populate_scalar(), range_in(), ReadArrayStr(), and record_in().
Definition at line 1807 of file fmgr.c.
References palloc(), and PointerGetDatum().
Referenced by brin_metapage_info(), brin_page_items(), brin_summarize_new_values(), build_minmax_path(), CashGetDatum(), create_final_distinct_paths(), create_partial_distinct_paths(), DefineSequence(), delay_execution_planner(), ExecEvalNextValueExpr(), executeItemOptUnwrapTarget(), FillXLogStatsRow(), gbt_num_fetch(), generate_series_step_int8(), GetWALBlockInfo(), gin_metapage_info(), gin_page_opaque_info(), gist_page_opaque_info(), hash_array_extended(), hash_bitmap_info(), hash_metapage_info(), hash_page_items(), hash_page_stats(), hash_record_extended(), IdentifySystem(), injection_points_stats_fixed(), int4_cash(), int8_cash(), int8_to_char(), int8range_canonical(), leftmostvalue_int8(), leftmostvalue_money(), LSNGetDatum(), make_const(), perform_work_item(), pg_available_wal_summaries(), pg_buffercache_pages(), pg_control_system(), pg_get_logical_snapshot_meta(), pg_get_replication_slots(), pg_get_sequence_data(), pg_get_shmem_allocations(), pg_get_wal_summarizer_state(), pg_ls_dir_files(), pg_sequence_parameters(), pg_split_walfile_name(), pg_stat_file(), pg_stat_get_archiver(), pg_stat_get_progress_info(), pg_stat_get_recovery_prefetch(), pg_stat_get_replication_slot(), pg_stat_get_slru(), pg_stat_get_subscription_stats(), pg_stat_get_wal(), pg_stat_io_build_tuples(), pg_stat_statements_info(), pg_visibility_map_rel(), pg_visibility_map_summary(), pg_visibility_rel(), pg_wal_summary_contents(), pgstatginindex_internal(), pgstathashindex(), pgstattuple_approx_internal(), PutMemoryContextsStatsTupleStore(), ReadReplicationSlot(), report_corruption_internal(), rewriteSearchAndCycle(), SendTablespaceList(), SendXlogRecPtrResult(), StartReplication(), TimeADTGetDatum(), TimestampGetDatum(), TimestampTzGetDatum(), TSQuerySignGetDatum(), UInt64GetDatum(), and validate_index_callback().
|
static |
Definition at line 515 of file fmgr.c.
References CFuncHash, CFuncHashTabEntry::fn_tid, CFuncHashTabEntry::fn_xmin, GETSTRUCT(), HASH_FIND, hash_search(), HeapTupleHeaderGetRawXmin(), ItemPointerEquals(), HeapTupleData::t_data, and HeapTupleData::t_self.
Referenced by fmgr_info_C_lang().
Definition at line 1401 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall0Coll().
Definition at line 1411 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall1Coll().
Referenced by _bt_allequalimage(), _hash_datum2hashkey_type(), and gisttranslatecmptype().
Definition at line 1421 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall2Coll().
Referenced by _bt_compare_scankey_args(), and index_recheck_constraint().
Definition at line 1431 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall3Coll().
Datum OidFunctionCall4Coll | ( | Oid | functionId, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4 | ||
) |
Definition at line 1442 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall4Coll().
Referenced by restriction_selectivity().
Datum OidFunctionCall5Coll | ( | Oid | functionId, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5 | ||
) |
Definition at line 1453 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall5Coll().
Referenced by join_selectivity().
Datum OidFunctionCall6Coll | ( | Oid | functionId, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6 | ||
) |
Definition at line 1464 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall6Coll().
Datum OidFunctionCall7Coll | ( | Oid | functionId, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6, | ||
Datum | arg7 | ||
) |
Definition at line 1477 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall7Coll().
Datum OidFunctionCall8Coll | ( | Oid | functionId, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6, | ||
Datum | arg7, | ||
Datum | arg8 | ||
) |
Definition at line 1490 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall8Coll().
Datum OidFunctionCall9Coll | ( | Oid | functionId, |
Oid | collation, | ||
Datum | arg1, | ||
Datum | arg2, | ||
Datum | arg3, | ||
Datum | arg4, | ||
Datum | arg5, | ||
Datum | arg6, | ||
Datum | arg7, | ||
Datum | arg8, | ||
Datum | arg9 | ||
) |
Definition at line 1503 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), and FunctionCall9Coll().
Definition at line 1754 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), InputFunctionCall(), and str.
Referenced by DefineAggregate(), exec_bind_message(), get_typdefault(), GetAggInitVal(), InsertOneValue(), parse_fcall_arguments(), slot_modify_data(), slot_store_data(), and stringTypeDatum().
Definition at line 1763 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), OutputFunctionCall(), and val.
Referenced by brin_minmax_multi_summary_out(), BuildIndexValueDescription(), BuildParamLogString(), convert_value_to_string(), datum_to_json_internal(), datum_to_jsonb_internal(), debugtup(), deparseConst(), ExecBuildSlotPartitionKeyDescription(), ExecBuildSlotValueDescription(), get_const_expr(), gist_page_items(), InsertOneValue(), logicalrep_write_tuple(), map_sql_value_to_xml_value(), plperl_hash_from_tuple(), plperl_sv_to_literal(), pltcl_build_tuple_argument(), pltcl_set_tuple_values(), print_expr(), ri_ReportViolation(), SendFunctionResult(), set_limit(), SPI_getvalue(), and tuple_to_stringinfo().
Datum OidReceiveFunctionCall | ( | Oid | functionId, |
StringInfo | buf, | ||
Oid | typioparam, | ||
int32 | typmod | ||
) |
Definition at line 1772 of file fmgr.c.
References buf, fmgr_security_definer_cache::flinfo, fmgr_info(), and ReceiveFunctionCall().
Referenced by exec_bind_message(), parse_fcall_arguments(), slot_modify_data(), and slot_store_data().
Definition at line 1782 of file fmgr.c.
References fmgr_security_definer_cache::flinfo, fmgr_info(), SendFunctionCall(), and val.
Referenced by logicalrep_write_tuple(), and SendFunctionResult().
Definition at line 1683 of file fmgr.c.
References DatumGetCString(), fmgr_security_definer_cache::flinfo, FunctionCall1, and val.
Referenced by array_out(), array_to_text_internal(), brin_minmax_multi_summary_out(), brin_page_items(), concat_internal(), convert_prep_stmt_params(), CopyOneRowTo(), hstore_from_record(), make_array_ref(), multirange_out(), OidOutputFunctionCall(), plperl_call_perl_func(), plsample_func_handler(), pltcl_func_handler(), PLyUnicode_FromScalar(), printtup(), process_query_params(), range_out(), record_out(), serializeAnalyzeReceive(), text_format(), and text_format_string_conversion().
Definition at line 1832 of file fmgr.c.
References detoast_attr(), and VARATT_IS_EXTENDED.
Definition at line 1841 of file fmgr.c.
References detoast_attr(), len, palloc(), VARATT_IS_EXTENDED, and VARSIZE.
Referenced by tuple_data_split_internal().
Definition at line 1864 of file fmgr.c.
References detoast_attr(), VARATT_IS_COMPRESSED, and VARATT_IS_EXTERNAL.
Referenced by escape_json_text(), makeJsonLexContext(), text_to_cstring(), text_to_cstring_buffer(), and transform_jsonb_string_values().
Definition at line 1857 of file fmgr.c.
References detoast_attr_slice().
Datum ReceiveFunctionCall | ( | FmgrInfo * | flinfo, |
StringInfo | buf, | ||
Oid | typioparam, | ||
int32 | typmod | ||
) |
Definition at line 1697 of file fmgr.c.
References buf, elog, ERROR, fmgr_security_definer_cache::flinfo, FmgrInfo::fn_oid, FmgrInfo::fn_strict, FunctionCallInvoke, InitFunctionCallInfoData, Int32GetDatum(), InvalidOid, LOCAL_FCINFO, ObjectIdGetDatum(), and PointerGetDatum().
Referenced by array_agg_deserialize(), CopyReadBinaryAttribute(), domain_recv(), multirange_recv(), OidReceiveFunctionCall(), range_recv(), ReadArrayBinary(), and record_recv().
|
static |
Definition at line 539 of file fmgr.c.
References CFuncHash, HASHCTL::entrysize, CFuncHashTabEntry::fn_tid, CFuncHashTabEntry::fn_xmin, GETSTRUCT(), HASH_BLOBS, hash_create(), HASH_ELEM, HASH_ENTER, hash_search(), HeapTupleHeaderGetRawXmin(), CFuncHashTabEntry::inforec, HASHCTL::keysize, HeapTupleData::t_data, HeapTupleData::t_self, and CFuncHashTabEntry::user_fn.
Referenced by fmgr_info_C_lang().
Definition at line 1744 of file fmgr.c.
References DatumGetByteaP, fmgr_security_definer_cache::flinfo, FunctionCall1, and val.
Referenced by array_agg_serialize(), array_send(), CopyOneRowTo(), multirange_send(), OidSendFunctionCall(), printtup(), range_send(), record_send(), and serializeAnalyzeReceive().
Definition at line 2070 of file fmgr.c.
References FmgrInfo::fn_expr, InvalidOid, makeConst(), and PointerGetDatum().
Referenced by gincost_pattern(), and index_getprocinfo().
|
static |
Definition at line 55 of file fmgr.c.
Referenced by lookup_C_func(), and record_C_func().
PGDLLIMPORT fmgr_hook_type fmgr_hook = NULL |
Definition at line 40 of file fmgr.c.
Referenced by fmgr_security_definer(), and sepgsql_init_client_label().
PGDLLIMPORT needs_fmgr_hook_type needs_fmgr_hook = NULL |
Definition at line 39 of file fmgr.c.
Referenced by sepgsql_init_client_label().