|
PostgreSQL Source Code git master
|
#include "postgres.h"#include "access/heapam.h"#include "catalog/indexing.h"#include "catalog/namespace.h"#include "catalog/pg_operator.h"#include "nodes/makefuncs.h"#include "statistics/statistics.h"#include "statistics/stat_utils.h"#include "utils/array.h"#include "utils/builtins.h"#include "utils/fmgroids.h"#include "utils/lsyscache.h"#include "utils/syscache.h"
Go to the source code of this file.
Functions | |
| static bool | attribute_statistics_update (FunctionCallInfo fcinfo) |
| static void | upsert_pg_statistic (Relation starel, HeapTuple oldtup, const Datum *values, const bool *nulls, const bool *replaces) |
| static bool | delete_pg_statistic (Oid reloid, AttrNumber attnum, bool stainherit) |
| Datum | pg_clear_attribute_stats (PG_FUNCTION_ARGS) |
| Datum | pg_restore_attribute_stats (PG_FUNCTION_ARGS) |
Variables | |
| static struct StatsArgInfo | attarginfo [] |
| static struct StatsArgInfo | cleararginfo [] |
Definition at line 38 of file attribute_stats.c.
| Enumerator | |
|---|---|
| C_ATTRELSCHEMA_ARG | |
| C_ATTRELNAME_ARG | |
| C_ATTNAME_ARG | |
| C_INHERITED_ARG | |
| C_NUM_ATTRIBUTE_STATS_ARGS | |
Definition at line 89 of file attribute_stats.c.
|
static |
Definition at line 129 of file attribute_stats.c.
References attarginfo, attname, ATTNAME_ARG, attnum, ATTNUM_ARG, ATTRELNAME_ARG, ATTRELSCHEMA_ARG, AVG_WIDTH_ARG, BoolGetDatum(), construct_array_builtin(), CORRELATION_ARG, ELEM_COUNT_HISTOGRAM_ARG, ereport, errcode(), errdetail(), errhint(), errmsg(), ERROR, fmgr_info(), get_attname(), get_attnum(), heap_deform_tuple(), HeapTupleIsValid, HISTOGRAM_BOUNDS_ARG, INHERITED_ARG, Int16GetDatum(), InvalidAttrNumber, InvalidOid, makeRangeVar(), MOST_COMMON_ELEM_FREQS_ARG, MOST_COMMON_ELEMS_ARG, MOST_COMMON_FREQS_ARG, MOST_COMMON_VALS_ARG, N_DISTINCT_ARG, NULL_FRAC_ARG, ObjectIdGetDatum(), OidIsValid, PG_ARGISNULL, PG_GETARG_BOOL, PG_GETARG_DATUM, PG_GETARG_INT16, PointerGetDatum(), RANGE_BOUNDS_HISTOGRAM_ARG, RANGE_EMPTY_FRAC_ARG, RANGE_LENGTH_HISTOGRAM_ARG, RangeVarCallbackForStats(), RangeVarGetRelidExtended(), RecoveryInProgress(), RelationGetDescr, ReleaseSysCache(), relname, RowExclusiveLock, SearchSysCache3(), SearchSysCacheExistsAttName(), ShareUpdateExclusiveLock, statatt_build_stavalues(), statatt_get_elem_type(), statatt_get_type(), statatt_init_empty_tuple(), statatt_set_slot(), stats_check_arg_array(), stats_check_arg_pair(), stats_check_required_arg(), table_close(), table_open(), TextDatumGetCString, upsert_pg_statistic(), values, and WARNING.
Referenced by pg_restore_attribute_stats().
|
static |
Definition at line 551 of file attribute_stats.c.
References attnum, BoolGetDatum(), CatalogTupleDelete(), CommandCounterIncrement(), HeapTupleIsValid, Int16GetDatum(), ObjectIdGetDatum(), ReleaseSysCache(), RowExclusiveLock, SearchSysCache3(), HeapTupleData::t_self, table_close(), and table_open().
Referenced by pg_clear_attribute_stats().
| Datum pg_clear_attribute_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 581 of file attribute_stats.c.
References attname, attnum, C_ATTNAME_ARG, C_ATTRELNAME_ARG, C_ATTRELSCHEMA_ARG, C_INHERITED_ARG, cleararginfo, delete_pg_statistic(), ereport, errcode(), errhint(), errmsg(), ERROR, get_attnum(), get_rel_name(), InvalidAttrNumber, InvalidOid, makeRangeVar(), PG_GETARG_BOOL, PG_GETARG_DATUM, PG_RETURN_VOID, RangeVarCallbackForStats(), RangeVarGetRelidExtended(), RecoveryInProgress(), relname, ShareUpdateExclusiveLock, stats_check_required_arg(), and TextDatumGetCString.
| Datum pg_restore_attribute_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 657 of file attribute_stats.c.
References attarginfo, attribute_statistics_update(), InitFunctionCallInfoData, InvalidOid, LOCAL_FCINFO, NUM_ATTRIBUTE_STATS_ARGS, PG_RETURN_BOOL, and stats_fill_fcinfo_from_arg_pairs().
|
static |
Definition at line 525 of file attribute_stats.c.
References CatalogTupleInsert(), CatalogTupleUpdate(), CommandCounterIncrement(), heap_form_tuple(), heap_freetuple(), heap_modify_tuple(), HeapTupleIsValid, RelationGetDescr, HeapTupleData::t_self, and values.
Referenced by attribute_statistics_update().
|
static |
Definition at line 61 of file attribute_stats.c.
Referenced by attribute_statistics_update(), and pg_restore_attribute_stats().
|
static |
Definition at line 98 of file attribute_stats.c.
Referenced by pg_clear_attribute_stats().