From ae3461fd57564200b9fdc1216116bef512d3089c Mon Sep 17 00:00:00 2001 From: Alexander Korotkov Date: Sat, 25 Nov 2023 00:38:05 +0200 Subject: [PATCH 1/2] Add comment to pg_statistic catalog table Make a reminder that pg_stats view needs to be modified whenever a new slot kind is added. To prevent situations like 918eee0c49 when pg_stats was forgotten to be updated. Discussion: https://postgr.es/m/flat/b67d8b57-9357-7e82-a2e7-f6ce6eaeec67@postgrespro.ru Author: Egor Rogov, Soumyadeep Chakraborty Reviewed-by: Tomas Vondra, Justin Pryzby, Jian He --- src/include/catalog/pg_statistic.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/include/catalog/pg_statistic.h b/src/include/catalog/pg_statistic.h index 0808c5fc893..95878422752 100644 --- a/src/include/catalog/pg_statistic.h +++ b/src/include/catalog/pg_statistic.h @@ -152,6 +152,9 @@ DECLARE_FOREIGN_KEY((starelid, staattnum), pg_attribute, (attrelid, attnum)); * data "kind" will appear in any particular slot. Instead, search the * stakind fields to see if the desired data is available. (The standard * function get_attstatsslot() may be used for this.) + * + * Note: The pg_stats view needs to be modified whenever a new slot kind is + * added to core. */ /* -- 2.39.3 (Apple Git-145)