Create functions pg_set_relation_stats, pg_clear_relation_stats.
Jeff Davis <jdavis@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/func.sgml | modified | +94 −0 |
| src/backend/catalog/system_functions.sql | modified | +10 −0 |
| src/backend/statistics/Makefile | modified | +3 −1 |
| src/backend/statistics/meson.build | modified | +2 −0 |
| src/backend/statistics/relation_stats.c | added | +210 −0 |
| src/backend/statistics/stat_utils.c | added | +94 −0 |
| src/include/catalog/catversion.h | modified | +1 −1 |
| src/include/catalog/pg_proc.dat | modified | +15 −0 |
| src/include/statistics/stat_utils.h | added | +29 −0 |
| src/test/regress/expected/stats_import.out | added | +143 −0 |
| src/test/regress/parallel_schedule | modified | +1 −1 |
| src/test/regress/sql/stats_import.sql | added | +98 −0 |
Documentation touched
Discussion
- Statistics Import and Export 555 messages · 2023-08-31 → 2025-05-22