|
PostgreSQL Source Code git master
|


Go to the source code of this file.
Data Structures | |
| struct | StatsArgInfo |
Typedefs | |
| typedef struct RangeVar | RangeVar |
Functions | |
| void | stats_check_required_arg (FunctionCallInfo fcinfo, struct StatsArgInfo *arginfo, int argnum) |
| bool | stats_check_arg_array (FunctionCallInfo fcinfo, struct StatsArgInfo *arginfo, int argnum) |
| bool | stats_check_arg_pair (FunctionCallInfo fcinfo, struct StatsArgInfo *arginfo, int argnum1, int argnum2) |
| void | RangeVarCallbackForStats (const RangeVar *relation, Oid relId, Oid oldRelId, void *arg) |
| bool | stats_fill_fcinfo_from_arg_pairs (FunctionCallInfo pairs_fcinfo, FunctionCallInfo positional_fcinfo, struct StatsArgInfo *arginfo) |
| void | statatt_get_type (Oid reloid, AttrNumber attnum, Oid *atttypid, int32 *atttypmod, char *atttyptype, Oid *atttypcoll, Oid *eq_opr, Oid *lt_opr) |
| void | statatt_init_empty_tuple (Oid reloid, int16 attnum, bool inherited, Datum *values, bool *nulls, bool *replaces) |
| void | statatt_set_slot (Datum *values, bool *nulls, bool *replaces, int16 stakind, Oid staop, Oid stacoll, Datum stanumbers, bool stanumbers_isnull, Datum stavalues, bool stavalues_isnull) |
| Datum | statatt_build_stavalues (const char *staname, FmgrInfo *array_in, Datum d, Oid typid, int32 typmod, bool *ok) |
| bool | statatt_get_elem_type (Oid atttypid, char atttyptype, Oid *elemtypid, Oid *elem_eq_opr) |
Definition at line 20 of file stat_utils.h.
Definition at line 141 of file stat_utils.c.
References ACL_MAINTAIN, aclcheck_error(), ACLCHECK_OK, arg, elog, ereport, errcode(), errdetail_relkind_not_supported(), errmsg(), ERROR, get_rel_relkind(), get_relkind_objtype(), GETSTRUCT(), GetUserId(), HeapTupleIsValid, IndexGetRelation(), InvalidOid, LockRelationOid(), MyDatabaseId, NameStr, object_ownercheck(), ObjectIdGetDatum(), OidIsValid, pg_class_aclcheck(), ReleaseSysCache(), RangeVar::relname, SearchSysCache1(), ShareUpdateExclusiveLock, and UnlockRelationOid().
Referenced by attribute_statistics_update(), pg_clear_attribute_stats(), and relation_statistics_update().
| Datum statatt_build_stavalues | ( | const char * | staname, |
| FmgrInfo * | array_in, | ||
| Datum | d, | ||
| Oid | typid, | ||
| int32 | typmod, | ||
| bool * | ok | ||
| ) |
Definition at line 566 of file stat_utils.c.
References array_contains_nulls(), array_in(), CStringGetDatum(), DatumGetArrayTypeP, ErrorSaveContext::details_wanted, ErrorData::elevel, ereport, errcode(), errmsg(), ErrorSaveContext::error_data, ErrorSaveContext::error_occurred, FunctionCallInvoke, InitFunctionCallInfoData, Int32GetDatum(), InvalidOid, LOCAL_FCINFO, ObjectIdGetDatum(), pfree(), TextDatumGetCString, ThrowErrorData(), and WARNING.
Referenced by attribute_statistics_update().
Definition at line 522 of file stat_utils.c.
References TypeCacheEntry::eq_opr, get_base_element_type(), lookup_type_cache(), OidIsValid, and TYPECACHE_EQ_OPR.
Referenced by attribute_statistics_update().
| void statatt_get_type | ( | Oid | reloid, |
| AttrNumber | attnum, | ||
| Oid * | atttypid, | ||
| int32 * | atttypmod, | ||
| char * | atttyptype, | ||
| Oid * | atttypcoll, | ||
| Oid * | eq_opr, | ||
| Oid * | lt_opr | ||
| ) |
Definition at line 436 of file stat_utils.c.
References AccessShareLock, attnum, TypeCacheEntry::eq_opr, ereport, errcode(), errmsg(), ERROR, exprCollation(), exprType(), exprTypmod(), get_multirange_range(), GETSTRUCT(), HeapTupleIsValid, Int16GetDatum(), lookup_type_cache(), TypeCacheEntry::lt_opr, NoLock, ObjectIdGetDatum(), OidIsValid, relation_close(), relation_open(), RelationGetRelationName, ReleaseSysCache(), SearchSysCache2(), statatt_get_index_expr(), type_is_multirange(), TYPECACHE_EQ_OPR, TYPECACHE_LT_OPR, and TypeCacheEntry::typtype.
Referenced by attribute_statistics_update().
| void statatt_init_empty_tuple | ( | Oid | reloid, |
| int16 | attnum, | ||
| bool | inherited, | ||
| Datum * | values, | ||
| bool * | nulls, | ||
| bool * | replaces | ||
| ) |
Definition at line 712 of file stat_utils.c.
References attnum, BoolGetDatum(), DEFAULT_STATATT_AVG_WIDTH, DEFAULT_STATATT_N_DISTINCT, DEFAULT_STATATT_NULL_FRAC, Int16GetDatum(), InvalidOid, ObjectIdGetDatum(), STATISTIC_NUM_SLOTS, and values.
Referenced by attribute_statistics_update().
| void statatt_set_slot | ( | Datum * | values, |
| bool * | nulls, | ||
| bool * | replaces, | ||
| int16 | stakind, | ||
| Oid | staop, | ||
| Oid | stacoll, | ||
| Datum | stanumbers, | ||
| bool | stanumbers_isnull, | ||
| Datum | stavalues, | ||
| bool | stavalues_isnull | ||
| ) |
Definition at line 634 of file stat_utils.c.
References DatumGetInt16(), DatumGetObjectId(), ereport, errmsg(), ERROR, Int16GetDatum(), ObjectIdGetDatum(), STATISTIC_NUM_SLOTS, and values.
Referenced by attribute_statistics_update().
| bool stats_check_arg_array | ( | FunctionCallInfo | fcinfo, |
| struct StatsArgInfo * | arginfo, | ||
| int | argnum | ||
| ) |
Definition at line 69 of file stat_utils.c.
References ARR_NDIM, array_contains_nulls(), DatumGetArrayTypeP, ereport, errcode(), errmsg(), PG_ARGISNULL, PG_GETARG_DATUM, and WARNING.
Referenced by attribute_statistics_update().
| bool stats_check_arg_pair | ( | FunctionCallInfo | fcinfo, |
| struct StatsArgInfo * | arginfo, | ||
| int | argnum1, | ||
| int | argnum2 | ||
| ) |
Definition at line 110 of file stat_utils.c.
References ereport, errcode(), errmsg(), PG_ARGISNULL, and WARNING.
Referenced by attribute_statistics_update().
| void stats_check_required_arg | ( | FunctionCallInfo | fcinfo, |
| struct StatsArgInfo * | arginfo, | ||
| int | argnum | ||
| ) |
Definition at line 50 of file stat_utils.c.
References ereport, errcode(), errmsg(), ERROR, and PG_ARGISNULL.
Referenced by attribute_statistics_update(), pg_clear_attribute_stats(), and relation_statistics_update().
| bool stats_fill_fcinfo_from_arg_pairs | ( | FunctionCallInfo | pairs_fcinfo, |
| FunctionCallInfo | positional_fcinfo, | ||
| struct StatsArgInfo * | arginfo | ||
| ) |
Definition at line 347 of file stat_utils.c.
References StatsArgInfo::argname, generate_unaccent_rules::args, FunctionCallInfoBaseData::args, ereport, errhint(), errmsg(), ERROR, extract_variadic_args(), format_type_be(), get_arg_by_name(), i, NullableDatum::isnull, pg_strcasecmp(), stats_check_arg_type(), TextDatumGetCString, types, and NullableDatum::value.
Referenced by pg_restore_attribute_stats(), and pg_restore_relation_stats().