Disallow CREATE STATISTICS on system catalogs
Tomas Vondra <tomas.vondra@postgresql.org>
Disallow CREATE STATISTICS on system catalogs Add a check that CREATE STATISTICS does not add extended statistics on system catalogs, similarly to indexes etc. It can be overriden using the allow_system_table_mods GUC. This bug exists since 7b504eb282c, adding the extended statistics, so backpatch all the way back to PostgreSQL 10. Author: Tomas Vondra Reported-by: Dean Rasheed Backpatch-through: 10 Discussion: https://postgr.es/m/CAEZATCXAPrrOKwEsyZKQ4uzzJQWBCt6QAvOcgqRGdWwT1zb%2BrQ%40mail.gmail.com
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/commands/statscmds.c | modified | +7 −0 |
| src/test/regress/expected/stats_ext.out | modified | +7 −5 |
| src/test/regress/sql/stats_ext.sql | modified | +7 −5 |
Discussion
- PoC/WIP: Extended statistics on expressions 107 messages · 2020-11-16 → 2021-09-19