PostgreSQL Source Code
git master
|
#include "postgres.h"
#include "access/heapam.h"
#include "catalog/indexing.h"
#include "statistics/stat_utils.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) |
Datum | pg_set_relation_stats (PG_FUNCTION_ARGS) |
Datum | pg_clear_relation_stats (PG_FUNCTION_ARGS) |
Variables | |
static struct StatsArgInfo | relarginfo [] |
#define DEFAULT_RELALLVISIBLE Int32GetDatum(0) |
Definition at line 28 of file relation_stats.c.
#define DEFAULT_RELPAGES Int32GetDatum(0) |
Definition at line 26 of file relation_stats.c.
#define DEFAULT_RELTUPLES Float4GetDatum(-1.0) |
Definition at line 27 of file relation_stats.c.
Enumerator | |
---|---|
RELATION_ARG | |
RELPAGES_ARG | |
RELTUPLES_ARG | |
RELALLVISIBLE_ARG | |
NUM_RELATION_STATS_ARGS |
Definition at line 35 of file relation_stats.c.
Datum pg_clear_relation_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 200 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_set_relation_stats | ( | PG_FUNCTION_ARGS | ) |
Definition at line 189 of file relation_stats.c.
References ERROR, PG_RETURN_VOID, and relation_statistics_update().
|
static |
Definition at line 59 of file relation_stats.c.
References CatalogTupleUpdate(), ereport, errcode(), errmsg(), Float4GetDatum(), GETSTRUCT, heap_freetuple(), heap_modify_tuple_by_cols(), HeapTupleIsValid, Int32GetDatum(), ObjectIdGetDatum(), PG_ARGISNULL, PG_GETARG_FLOAT4, PG_GETARG_INT32, PG_GETARG_OID, RELALLVISIBLE_ARG, relarginfo, RELATION_ARG, RelationGetDescr, RELPAGES_ARG, RELTUPLES_ARG, RowExclusiveLock, SearchSysCacheCopy1, stats_check_required_arg(), stats_lock_check_privileges(), HeapTupleData::t_self, table_close(), table_open(), and values.
Referenced by pg_clear_relation_stats(), and pg_set_relation_stats().
|
static |
Definition at line 1 of file relation_stats.c.
Referenced by relation_statistics_update().