postgres/src/include/statistics/stat_utils.h
Jeff Davis ce207d2a79 Add functions pg_set_attribute_stats() and pg_clear_attribute_stats().
Enable manipulation of attribute statistics. Only superficial
validation is performed, so it's possible to add nonsense, and it's up
to the planner (or other users of statistics) to behave reasonably in
that case.

Bump catalog version.

Author: Corey Huinker
Discussion: https://postgr.es/m/CADkLM=eErgzn7ECDpwFcptJKOk9SxZEk5Pot4d94eVTZsvj3gw@mail.gmail.com
2024-10-22 15:06:55 -07:00

37 lines
1.0 KiB
C

/*-------------------------------------------------------------------------
*
* stat_utils.h
* Extended statistics and selectivity estimation functions.
*
* Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
* src/include/statistics/stat_utils.h
*
*-------------------------------------------------------------------------
*/
#ifndef STATS_UTILS_H
#define STATS_UTILS_H
#include "fmgr.h"
struct StatsArgInfo
{
const char *argname;
Oid argtype;
};
extern void stats_check_required_arg(FunctionCallInfo fcinfo,
struct StatsArgInfo *arginfo,
int argnum);
extern bool stats_check_arg_array(FunctionCallInfo fcinfo,
struct StatsArgInfo *arginfo, int argnum,
int elevel);
extern bool stats_check_arg_pair(FunctionCallInfo fcinfo,
struct StatsArgInfo *arginfo,
int argnum1, int argnum2, int elevel);
extern void stats_lock_check_privileges(Oid reloid);
#endif /* STATS_UTILS_H */