mirror of
https://git.postgresql.org/git/postgresql.git
synced 2026-02-22 22:37:01 +08:00
After commit f3dae2ae58, the primary purpose of separating the pg_set_*_stats() from the pg_restore_*_stats() variants was eliminated. Leave pg_restore_relation_stats() and pg_restore_attribute_stats(), which satisfy both purposes, and remove pg_set_relation_stats() and pg_set_attribute_stats(). Reviewed-by: Corey Huinker <corey.huinker@gmail.com> Discussion: https://postgr.es/m/1457469.1740419458@sss.pgh.pa.us
40 lines
1.2 KiB
C
40 lines
1.2 KiB
C
/*-------------------------------------------------------------------------
|
|
*
|
|
* stat_utils.h
|
|
* Extended statistics and selectivity estimation functions.
|
|
*
|
|
* Portions Copyright (c) 1996-2025, 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);
|
|
extern bool stats_check_arg_pair(FunctionCallInfo fcinfo,
|
|
struct StatsArgInfo *arginfo,
|
|
int argnum1, int argnum2);
|
|
|
|
extern void stats_lock_check_privileges(Oid reloid);
|
|
|
|
extern bool stats_fill_fcinfo_from_arg_pairs(FunctionCallInfo pairs_fcinfo,
|
|
FunctionCallInfo positional_fcinfo,
|
|
struct StatsArgInfo *arginfo);
|
|
|
|
#endif /* STATS_UTILS_H */
|