30#include "utils/fmgroids.h"
178 errmsg(
"recovery is in progress"),
179 errhint(
"Statistics cannot be modified during recovery."));
199 errmsg(
"could not find schema \"%s\"", nspname));
211 errmsg(
"could not find extended statistics object \"%s\".\"%s\"",
222 if (
stxform->stxrelid != relid)
227 errmsg(
"could not clear extended statistics object \"%s\".\"%s\": incorrect relation \"%s\".\"%s\" specified",
#define TextDatumGetCString(d)
#define OidIsValid(objectId)
int errhint(const char *fmt,...)
int errcode(int sqlerrcode)
int errmsg(const char *fmt,...)
#define ereport(elevel,...)
@ NUM_EXTENDED_STATS_ARGS
Datum pg_clear_extended_stats(PG_FUNCTION_ARGS)
static bool delete_pg_statistic_ext_data(Oid stxoid, bool inherited)
static struct StatsArgInfo extarginfo[]
static HeapTuple get_pg_statistic_ext(Relation pg_stext, Oid nspoid, const char *stxname)
#define PG_GETARG_DATUM(n)
#define PG_GETARG_BOOL(n)
void systable_endscan(SysScanDesc sysscan)
HeapTuple systable_getnext(SysScanDesc sysscan)
SysScanDesc systable_beginscan(Relation heapRelation, Oid indexId, bool indexOK, Snapshot snapshot, int nkeys, ScanKey key)
void heap_freetuple(HeapTuple htup)
#define HeapTupleIsValid(tuple)
static void * GETSTRUCT(const HeapTupleData *tuple)
void CatalogTupleDelete(Relation heapRel, const ItemPointerData *tid)
#define ShareUpdateExclusiveLock
char * get_namespace_name(Oid nspid)
RangeVar * makeRangeVar(char *schemaname, char *relname, int location)
Oid get_namespace_oid(const char *nspname, bool missing_ok)
Oid RangeVarGetRelidExtended(const RangeVar *relation, LOCKMODE lockmode, uint32 flags, RangeVarGetRelidCallback callback, void *callback_arg)
FormData_pg_statistic_ext * Form_pg_statistic_ext
static Datum BoolGetDatum(bool X)
static Datum ObjectIdGetDatum(Oid X)
static Datum CStringGetDatum(const char *X)
void ScanKeyInit(ScanKey entry, AttrNumber attributeNumber, StrategyNumber strategy, RegProcedure procedure, Datum argument)
void RangeVarCallbackForStats(const RangeVar *relation, Oid relId, Oid oldRelId, void *arg)
void stats_check_required_arg(FunctionCallInfo fcinfo, struct StatsArgInfo *arginfo, int argnum)
#define BTEqualStrategyNumber
void ReleaseSysCache(HeapTuple tuple)
HeapTuple SearchSysCache2(int cacheId, Datum key1, Datum key2)
#define SearchSysCacheCopy1(cacheId, key1)
void table_close(Relation relation, LOCKMODE lockmode)
Relation table_open(Oid relationId, LOCKMODE lockmode)
void CommandCounterIncrement(void)
bool RecoveryInProgress(void)