, relallvisible integer )
- boolean
+ void
Updates relation-level statistics for the given relation to the
specified values. The parameters correspond to columns in
linkend="catalog-pg-class">pg_class. Unspecified
- or NULL values leave the setting
- unchanged. Returns true if a change was made;
- false otherwise.
+ or NULL values leave the setting unchanged.
Ordinarily, these statistics are collected automatically or updated
pg_clear_relation_stats (
relation regclass )
- boolean
+ void
Clears table-level statistics for the given relation, as though the
- table was newly created. Returns true if a change
- was made; false otherwise.
+ table was newly created.
The caller must have the MAINTAIN privilege on
relpages integer DEFAULT NULL,
reltuples real DEFAULT NULL,
relallvisible integer DEFAULT NULL)
-RETURNS bool
+RETURNS void
LANGUAGE INTERNAL
CALLED ON NULL INPUT VOLATILE
AS 'pg_set_relation_stats';
Datum
pg_set_relation_stats(PG_FUNCTION_ARGS)
{
- PG_RETURN_BOOL(relation_statistics_update(fcinfo, ERROR));
+ relation_statistics_update(fcinfo, ERROR);
+ PG_RETURN_VOID();
}
/*
newfcinfo->args[3].value = DEFAULT_RELALLVISIBLE;
newfcinfo->args[3].isnull = false;
- PG_RETURN_BOOL(relation_statistics_update(newfcinfo, ERROR));
+ relation_statistics_update(newfcinfo, ERROR);
+ PG_RETURN_VOID();
}
*/
/* yyyymmddN */
-#define CATALOG_VERSION_NO 202410141
+#define CATALOG_VERSION_NO 202410221
#endif
{ oid => '9944',
descr => 'set statistics on relation',
proname => 'pg_set_relation_stats', provolatile => 'v', proisstrict => 'f',
- proparallel => 'u', prorettype => 'bool',
+ 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 => 'bool',
+ proparallel => 'u', prorettype => 'void',
proargtypes => 'regclass',
proargnames => '{relation}',
prosrc => 'pg_clear_relation_stats' },
relallvisible => 4::integer);
pg_set_relation_stats
-----------------------
- t
+
(1 row)
-- reltuples default
relallvisible => 4::integer);
pg_set_relation_stats
-----------------------
- t
+
(1 row)
-- relallvisible default
relallvisible => NULL::integer);
pg_set_relation_stats
-----------------------
- f
+
(1 row)
-- named arguments
relallvisible => 4::integer);
pg_set_relation_stats
-----------------------
- f
+
(1 row)
SELECT relpages, reltuples, relallvisible
5::integer);
pg_set_relation_stats
-----------------------
- t
+
(1 row)
SELECT relpages, reltuples, relallvisible
'stats_import.test'::regclass);
pg_clear_relation_stats
-------------------------
- t
+
(1 row)
SELECT relpages, reltuples, relallvisible
relpages => 2::integer);
pg_set_relation_stats
-----------------------
- t
+
(1 row)
-- nothing stops us from setting it to -1
relpages => -1::integer);
pg_set_relation_stats
-----------------------
- t
+
(1 row)
DROP SCHEMA stats_import CASCADE;