diff options
author | Jeff Davis | 2025-02-26 00:15:47 +0000 |
---|---|---|
committer | Jeff Davis | 2025-02-26 00:15:47 +0000 |
commit | a5cbdeb98af9a8d4f683fbffa69cd74be1f4a084 (patch) | |
tree | e138c9760fd5bc8e10a2373fb4e3434ddc3fe173 /src/include | |
parent | ecbff4378beecb0b1d12fc758538005a69821db1 (diff) |
Remove redundant pg_set_*_stats() variants.
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 <[email protected]>
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/catversion.h | 2 | ||||
-rw-r--r-- | src/include/catalog/pg_proc.dat | 32 | ||||
-rw-r--r-- | src/include/statistics/stat_utils.h | 8 |
3 files changed, 13 insertions, 29 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index f6a99472e76..12163ae94be 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -57,6 +57,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202502241 +#define CATALOG_VERSION_NO 202502242 #endif diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index af9546de23d..1c1d96e0c7e 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -1,4 +1,4 @@ -#---------------------------------------------------------------------- +\#---------------------------------------------------------------------- # # pg_proc.dat # Initial contents of the pg_proc system catalog. @@ -12420,7 +12420,14 @@ proargnames => '{kwargs}', proargmodes => '{v}', prosrc => 'pg_restore_relation_stats' }, -{ oid => '8460', +{ oid => '9160', + descr => 'clear statistics on relation', + proname => 'pg_clear_relation_stats', provolatile => 'v', proisstrict => 'f', + proparallel => 'u', prorettype => 'void', + proargtypes => 'regclass', + proargnames => '{relation}', + prosrc => 'pg_clear_relation_stats' }, +{ oid => '8461', descr => 'restore statistics on attribute', proname => 'pg_restore_attribute_stats', provolatile => 'v', proisstrict => 'f', provariadic => 'any', @@ -12430,33 +12437,12 @@ proargmodes => '{v}', prosrc => 'pg_restore_attribute_stats' }, { oid => '9162', - descr => 'set statistics on attribute', - proname => 'pg_set_attribute_stats', provolatile => 'v', proisstrict => 'f', - proparallel => 'u', prorettype => 'void', - proargtypes => 'regclass name bool float4 int4 float4 text _float4 text float4 text _float4 _float4 text float4 text', - proargnames => '{relation,attname,inherited,null_frac,avg_width,n_distinct,most_common_vals,most_common_freqs,histogram_bounds,correlation,most_common_elems,most_common_elem_freqs,elem_count_histogram,range_length_histogram,range_empty_frac,range_bounds_histogram}', - prosrc => 'pg_set_attribute_stats' }, -{ oid => '9163', descr => 'clear statistics on attribute', proname => 'pg_clear_attribute_stats', provolatile => 'v', proisstrict => 'f', proparallel => 'u', prorettype => 'void', proargtypes => 'regclass name bool', proargnames => '{relation,attname,inherited}', prosrc => 'pg_clear_attribute_stats' }, -{ oid => '9944', - descr => 'set statistics on relation', - proname => 'pg_set_relation_stats', provolatile => 'v', proisstrict => 'f', - proparallel => 'u', prorettype => 'void', - proargtypes => 'regclass int4 float4 int4', - proargnames => '{relation,relpages,reltuples,relallvisible}', - prosrc => 'pg_set_relation_stats' }, -{ oid => '9945', - descr => 'clear statistics on relation', - proname => 'pg_clear_relation_stats', provolatile => 'v', proisstrict => 'f', - proparallel => 'u', prorettype => 'void', - proargtypes => 'regclass', - proargnames => '{relation}', - prosrc => 'pg_clear_relation_stats' }, # GiST stratnum implementations { oid => '8047', descr => 'GiST support', diff --git a/src/include/statistics/stat_utils.h b/src/include/statistics/stat_utils.h index 6edb5ea0321..0eb4decfcac 100644 --- a/src/include/statistics/stat_utils.h +++ b/src/include/statistics/stat_utils.h @@ -25,17 +25,15 @@ 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); + struct StatsArgInfo *arginfo, int argnum); extern bool stats_check_arg_pair(FunctionCallInfo fcinfo, struct StatsArgInfo *arginfo, - int argnum1, int argnum2, int elevel); + 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, - int elevel); + struct StatsArgInfo *arginfo); #endif /* STATS_UTILS_H */ |