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.
Macros | |
#define | DEFAULT_RELPAGES Int32GetDatum(0) |
#define | DEFAULT_RELTUPLES Float4GetDatum(-1.0) |
#define | DEFAULT_RELALLVISIBLE Int32GetDatum(0) |
Enumerations | |
enum | relation_stats_argnum { RELATION_ARG = 0 , RELPAGES_ARG , RELTUPLES_ARG , RELALLVISIBLE_ARG , NUM_RELATION_STATS_ARGS } |
Functions | |
static bool | relation_statistics_update (FunctionCallInfo fcinfo, int elevel, bool inplace) |
Datum | pg_set_relation_stats (PG_FUNCTION_ARGS) |
Datum | pg_clear_relation_stats (PG_FUNCTION_ARGS) |
Datum | pg_restore_relation_stats (PG_FUNCTION_ARGS) |
Variables | |
static struct StatsArgInfo | relarginfo [] |
#define DEFAULT_RELALLVISIBLE Int32GetDatum(0) |
Definition at line 29 of file relation_stats.c.
#define DEFAULT_RELPAGES Int32GetDatum(0) |
Definition at line 27 of file relation_stats.c.
#define DEFAULT_RELTUPLES Float4GetDatum(-1.0) |
Definition at line 28 of file relation_stats.c.
Enumerator | |
---|---|
RELATION_ARG | |
RELPAGES_ARG | |
RELTUPLES_ARG | |
RELALLVISIBLE_ARG | |
NUM_RELATION_STATS_ARGS |
Definition at line 36 of file relation_stats.c.
Datum pg_clear_relation_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 258 of file relation_stats.c.
References DEFAULT_RELALLVISIBLE, DEFAULT_RELPAGES, DEFAULT_RELTUPLES, ERROR, InitFunctionCallInfoData, InvalidOid, LOCAL_FCINFO, PG_ARGISNULL, PG_GETARG_OID, PG_RETURN_VOID, and relation_statistics_update().
Datum pg_restore_relation_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 278 of file relation_stats.c.
References InitFunctionCallInfoData, InvalidOid, LOCAL_FCINFO, NUM_RELATION_STATS_ARGS, PG_RETURN_BOOL, relarginfo, relation_statistics_update(), stats_fill_fcinfo_from_arg_pairs(), and WARNING.
Datum pg_set_relation_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 247 of file relation_stats.c.
References ERROR, PG_RETURN_VOID, and relation_statistics_update().
|
static |
Definition at line 61 of file relation_stats.c.
References BTEqualStrategyNumber, CatalogTupleUpdate(), CommandCounterIncrement(), DEFAULT_RELALLVISIBLE, DEFAULT_RELPAGES, DEFAULT_RELTUPLES, elog, ereport, errcode(), errhint(), errmsg(), ERROR, Float4GetDatum(), GETSTRUCT, heap_freetuple(), heap_modify_tuple_by_cols(), HeapTupleIsValid, Int32GetDatum(), sort-test::key, ObjectIdGetDatum(), PG_ARGISNULL, PG_GETARG_FLOAT4, PG_GETARG_INT32, PG_GETARG_OID, RecoveryInProgress(), RELALLVISIBLE_ARG, relarginfo, RELATION_ARG, RelationGetDescr, ReleaseSysCache(), RELPAGES_ARG, RELTUPLES_ARG, RowExclusiveLock, ScanKeyInit(), SearchSysCache1(), stats_check_required_arg(), stats_lock_check_privileges(), systable_inplace_update_begin(), systable_inplace_update_cancel(), systable_inplace_update_finish(), HeapTupleData::t_self, table_close(), table_open(), and values.
Referenced by pg_clear_relation_stats(), pg_restore_relation_stats(), and pg_set_relation_stats().
|
static |
Definition at line 1 of file relation_stats.c.
Referenced by pg_restore_relation_stats(), and relation_statistics_update().