diff options
author | Jeff Davis | 2025-03-25 18:16:06 +0000 |
---|---|---|
committer | Jeff Davis | 2025-03-25 18:16:06 +0000 |
commit | 650ab8aaf1957863ae14c80265e79f5d903b49fd (patch) | |
tree | 6ea530310dc773d82160cc6cc6d66893ab8ec910 /src/include | |
parent | 2a420f7995e415f4813fccf1c42ab29a3a32182f (diff) |
Stats: use schemaname/relname instead of regclass.
For import and export, use schemaname/relname rather than
regclass.
This is more natural during export, fits with the other arguments
better, and it gives better control over error handling in case we
need to downgrade more errors to warnings.
Also, use text for the argument types for schemaname, relname, and
attname so that casts to "name" are not required.
Author: Corey Huinker <corey.huinker@gmail.com>
Discussion: https://postgr.es/m/CADkLM=ceOSsx_=oe73QQ-BxUFR2Cwqum7-UP_fPe22DBY0NerA@mail.gmail.com
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/catalog/catversion.h | 2 | ||||
-rw-r--r-- | src/include/catalog/pg_proc.dat | 8 | ||||
-rw-r--r-- | src/include/statistics/stat_utils.h | 2 |
3 files changed, 7 insertions, 5 deletions
diff --git a/src/include/catalog/catversion.h b/src/include/catalog/catversion.h index cf381867e40..5413efa9133 100644 --- a/src/include/catalog/catversion.h +++ b/src/include/catalog/catversion.h @@ -57,6 +57,6 @@ */ /* yyyymmddN */ -#define CATALOG_VERSION_NO 202503241 +#define CATALOG_VERSION_NO 202503251 #endif diff --git a/src/include/catalog/pg_proc.dat b/src/include/catalog/pg_proc.dat index 0d29ef50ff2..3f7b82e02bb 100644 --- a/src/include/catalog/pg_proc.dat +++ b/src/include/catalog/pg_proc.dat @@ -12453,8 +12453,8 @@ descr => 'clear statistics on relation', proname => 'pg_clear_relation_stats', provolatile => 'v', proisstrict => 'f', proparallel => 'u', prorettype => 'void', - proargtypes => 'regclass', - proargnames => '{relation}', + proargtypes => 'text text', + proargnames => '{schemaname,relname}', prosrc => 'pg_clear_relation_stats' }, { oid => '8461', descr => 'restore statistics on attribute', @@ -12469,8 +12469,8 @@ 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}', + proargtypes => 'text text text bool', + proargnames => '{schemaname,relname,attname,inherited}', prosrc => 'pg_clear_attribute_stats' }, # GiST stratnum implementations diff --git a/src/include/statistics/stat_utils.h b/src/include/statistics/stat_utils.h index 0eb4decfcac..512eb776e0e 100644 --- a/src/include/statistics/stat_utils.h +++ b/src/include/statistics/stat_utils.h @@ -32,6 +32,8 @@ extern bool stats_check_arg_pair(FunctionCallInfo fcinfo, extern void stats_lock_check_privileges(Oid reloid); +extern Oid stats_lookup_relid(const char *nspname, const char *relname); + extern bool stats_fill_fcinfo_from_arg_pairs(FunctionCallInfo pairs_fcinfo, FunctionCallInfo positional_fcinfo, struct StatsArgInfo *arginfo); |