diff options
| author | Jeff Davis | 2024-10-11 23:55:11 +0000 |
|---|---|---|
| committer | Jeff Davis | 2024-10-11 23:55:11 +0000 |
| commit | e839c8ecc9352b7754e74f19ace013c0c0d18613 (patch) | |
| tree | 881e69557ddddebec18104dc286c1ef160d8f909 /src/include/statistics | |
| parent | 6f782a2a1738ab96ee948a4ab33ca3defd39327b (diff) | |
Create functions pg_set_relation_stats, pg_clear_relation_stats.
These functions are used to tweak statistics on any relation, provided
that the user has MAINTAIN privilege on the relation, or is the database
owner.
Bump catalog version.
Author: Corey Huinker
Discussion: https://postgr.es/m/CADkLM=eErgzn7ECDpwFcptJKOk9SxZEk5Pot4d94eVTZsvj3gw@mail.gmail.com
Diffstat (limited to 'src/include/statistics')
| -rw-r--r-- | src/include/statistics/stat_utils.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/include/statistics/stat_utils.h b/src/include/statistics/stat_utils.h new file mode 100644 index 00000000000..46057c60c03 --- /dev/null +++ b/src/include/statistics/stat_utils.h @@ -0,0 +1,29 @@ +/*------------------------------------------------------------------------- + * + * 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 void stats_lock_check_privileges(Oid reloid); + +#endif /* STATS_UTILS_H */ |
