PostgreSQL Source Code git master
|
#include "postgres.h"
#include "access/heapam.h"
#include "catalog/indexing.h"
#include "statistics/stat_utils.h"
#include "utils/fmgroids.h"
#include "utils/fmgrprotos.h"
#include "utils/syscache.h"
Go to the source code of this file.
Enumerations | |
enum | relation_stats_argnum { RELATION_ARG = 0 , RELPAGES_ARG , RELTUPLES_ARG , RELALLVISIBLE_ARG , RELALLFROZEN_ARG , NUM_RELATION_STATS_ARGS } |
Functions | |
static bool | relation_statistics_update (FunctionCallInfo fcinfo) |
Datum | pg_clear_relation_stats (PG_FUNCTION_ARGS) |
Datum | pg_restore_relation_stats (PG_FUNCTION_ARGS) |
Variables | |
static struct StatsArgInfo | relarginfo [] |
Enumerator | |
---|---|
RELATION_ARG | |
RELPAGES_ARG | |
RELTUPLES_ARG | |
RELALLVISIBLE_ARG | |
RELALLFROZEN_ARG | |
NUM_RELATION_STATS_ARGS |
Definition at line 33 of file relation_stats.c.
Datum pg_clear_relation_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 188 of file relation_stats.c.
References Float4GetDatum(), InitFunctionCallInfoData, InvalidOid, LOCAL_FCINFO, PG_ARGISNULL, PG_GETARG_OID, PG_RETURN_VOID, relation_statistics_update(), and UInt32GetDatum().
Datum pg_restore_relation_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 210 of file relation_stats.c.
References InitFunctionCallInfoData, InvalidOid, LOCAL_FCINFO, NUM_RELATION_STATS_ARGS, PG_RETURN_BOOL, relarginfo, relation_statistics_update(), and stats_fill_fcinfo_from_arg_pairs().
|
static |
Definition at line 59 of file relation_stats.c.
References CatalogTupleUpdate(), CommandCounterIncrement(), elog, ereport, errcode(), errhint(), errmsg(), ERROR, Float4GetDatum(), GETSTRUCT(), heap_freetuple(), heap_modify_tuple_by_cols(), HeapTupleIsValid, ObjectIdGetDatum(), PG_ARGISNULL, PG_GETARG_FLOAT4, PG_GETARG_OID, PG_GETARG_UINT32, RecoveryInProgress(), RELALLFROZEN_ARG, RELALLVISIBLE_ARG, relarginfo, RELATION_ARG, RelationGetDescr, ReleaseSysCache(), RELPAGES_ARG, RELTUPLES_ARG, RowExclusiveLock, SearchSysCache1(), stats_check_required_arg(), stats_lock_check_privileges(), HeapTupleData::t_self, table_close(), table_open(), UInt32GetDatum(), values, and WARNING.
Referenced by pg_clear_relation_stats(), and pg_restore_relation_stats().
|
static |
Definition at line 43 of file relation_stats.c.
Referenced by pg_restore_relation_stats(), and relation_statistics_update().