{"Entry":{"collection":"catalog","key":"pg_stats_ext","name":"pg_stats_ext","aliases":[],"metadata":{"changed_in":["14","15","19"],"changes":[{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"11","order":false,"removed":[],"status":"added","to":"12","types":[]},{"added":["exprs"],"attributes":[],"description_changed":true,"descriptions":[{"from":"Names of the columns the extended statistics is defined on","name":"attnames","to":"Names of the columns included in the extended statistics object"},{"from":"Types of extended statistics enabled for this record","name":"kinds","to":"Types of extended statistics object enabled for this record"},{"from":"Name of extended statistics","name":"statistics_name","to":"Name of extended statistics object"},{"from":"Owner of the extended statistics","name":"statistics_owner","to":"Owner of the extended statistics object"},{"from":"Name of schema containing extended statistic","name":"statistics_schemaname","to":"Name of schema containing extended statistics object"}],"from":"13","listing":[],"order":false,"removed":[],"status":"changed","to":"14","types":[],"unlisted":[]},{"added":["inherited"],"attributes":[],"description_changed":false,"descriptions":[],"from":"14","listing":[],"order":false,"removed":[],"status":"changed","to":"15","types":[],"unlisted":[]},{"added":["tableid","statistics_id"],"attributes":[],"description_changed":false,"descriptions":[],"from":"18","listing":[],"order":false,"removed":[],"status":"changed","to":"19","types":[],"unlisted":[]}],"column_count":17,"content_hash":"ab44d8b145cc33405676b8d9a89ab7c442d801b144212d1e4e8918808834a38f","first_version":"12","imported_at":"2026-09-30T00:40:56.211067+08:00","kind":"view","last_version":"20","name":"pg_stats_ext","position":134,"present_in":["12","13","14","15","16","17","18","19","20"],"relation_oid":null,"relkind":"v","shared":false,"source_rev":"english-manuals:83214d6a9557afbf0114a783a345aa837ee564cf1f91a83f7cc01c33b7ca6f7b","summary":"The view pg_stats_ext provides access to information about each extended statistics object in the database, combining information stored in the pg_statistic_ext and pg_statistic_ext_data catalogs.","summary_zh":""}},"Definition":{"Collection":"catalog","Key":"pg_stats_ext","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_stats_ext","SourceRevision":"english-manuals:83214d6a9557afbf0114a783a345aa837ee564cf1f91a83f7cc01c33b7ca6f7b","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Name of schema containing table","description_zh":"","documented":true,"documented_name":"schemaname","hidden":false,"name":"schemaname","not_null":false,"references":"pg_namespace.nspname","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":2,"description":"Name of table","description_zh":"","documented":true,"documented_name":"tablename","hidden":false,"name":"tablename","not_null":false,"references":"pg_class.relname","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":3,"description":"Name of schema containing extended statistics object","description_zh":"","documented":true,"documented_name":"statistics_schemaname","hidden":false,"name":"statistics_schemaname","not_null":false,"references":"pg_namespace.nspname","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":4,"description":"Name of extended statistics object","description_zh":"","documented":true,"documented_name":"statistics_name","hidden":false,"name":"statistics_name","not_null":false,"references":"pg_statistic_ext.stxname","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":5,"description":"Owner of the extended statistics object","description_zh":"","documented":true,"documented_name":"statistics_owner","hidden":false,"name":"statistics_owner","not_null":false,"references":"pg_authid.rolname","type":"name","type_modifier":-1,"type_oid":19},{"array_dimensions":0,"attnum":6,"description":"Names of the columns included in the extended statistics object","description_zh":"","documented":true,"documented_name":"attnames","hidden":false,"name":"attnames","not_null":false,"references":"pg_attribute.attname","type":"name[]","type_modifier":-1,"type_oid":1003},{"array_dimensions":0,"attnum":7,"description":"Expressions included in the extended statistics object","description_zh":"","documented":true,"documented_name":"exprs","hidden":false,"name":"exprs","not_null":false,"references":"","type":"text[]","type_modifier":-1,"type_oid":1009},{"array_dimensions":0,"attnum":8,"description":"Types of extended statistics object enabled for this record","description_zh":"","documented":true,"documented_name":"kinds","hidden":false,"name":"kinds","not_null":false,"references":"","type":"char[]","type_modifier":-1,"type_oid":1002},{"array_dimensions":0,"attnum":9,"description":"If true, the stats include values from child tables, not just the values in the specified relation","description_zh":"","documented":true,"documented_name":"inherited","hidden":false,"name":"inherited","not_null":false,"references":"pg_statistic_ext_data.stxdinherit","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":10,"description":"N-distinct counts for combinations of column values. If greater than zero, the estimated number of distinct values in the combination. If less than zero, the negative of the number of distinct values divided by the number of rows. (The negated form is used when ANALYZE believes that the number of distinct values is likely to increase as the table grows; the positive form is used when the column seems to have a fixed number of possible values.) For example, -1 indicates a unique combination of columns in which the number of distinct combinations is the same as the number of rows.","description_zh":"","documented":true,"documented_name":"n_distinct","hidden":false,"name":"n_distinct","not_null":false,"references":"","type":"pg_ndistinct","type_modifier":-1,"type_oid":3361},{"array_dimensions":0,"attnum":11,"description":"Functional dependency statistics","description_zh":"","documented":true,"documented_name":"dependencies","hidden":false,"name":"dependencies","not_null":false,"references":"","type":"pg_dependencies","type_modifier":-1,"type_oid":3402},{"array_dimensions":0,"attnum":12,"description":"A list of the most common combinations of values in the columns. (Null if no combinations seem to be more common than any others.)","description_zh":"","documented":true,"documented_name":"most_common_vals","hidden":false,"name":"most_common_vals","not_null":false,"references":"","type":"text[]","type_modifier":-1,"type_oid":1009},{"array_dimensions":0,"attnum":13,"description":"A list of NULL flags for the most common combinations of values. (Null when most_common_vals is.)","description_zh":"","documented":true,"documented_name":"most_common_val_nulls","hidden":false,"name":"most_common_val_nulls","not_null":false,"references":"","type":"bool[]","type_modifier":-1,"type_oid":1000},{"array_dimensions":0,"attnum":14,"description":"A list of the frequencies of the most common combinations, i.e., number of occurrences of each divided by total number of rows. (Null when most_common_vals is.)","description_zh":"","documented":true,"documented_name":"most_common_freqs","hidden":false,"name":"most_common_freqs","not_null":false,"references":"","type":"float8[]","type_modifier":-1,"type_oid":1022},{"array_dimensions":0,"attnum":15,"description":"A list of the base frequencies of the most common combinations, i.e., product of per-value frequencies. (Null when most_common_vals is.)","description_zh":"","documented":true,"documented_name":"most_common_base_freqs","hidden":false,"name":"most_common_base_freqs","not_null":false,"references":"","type":"float8[]","type_modifier":-1,"type_oid":1022}],"description":"The view pg_stats_ext provides access to information about each extended statistics object in the database, combining information stored in the pg_statistic_ext and pg_statistic_ext_data catalogs. This view allows access only to rows of pg_statistic_ext and pg_statistic_ext_data that correspond to tables the user owns, and therefore it is safe to allow public read access to this view.\n\npg_stats_ext is also designed to present the information in a more readable format than the underlying catalogs — at the cost that its schema must be extended whenever new types of extended statistics are added to pg_statistic_ext.","description_zh":"","doc":{"anchor":"id-1.10.5.34.5","file":"view-pg-stats-ext.html","lang":"en","sha256":"9856c7727f22fb5303f09650d43c81c86e0ecb0e817d96cb75e40fcee9905c0a","slug":"18"},"kind":"view","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["schemaname","tablename","statistics_schemaname","statistics_name","statistics_owner","attnames","exprs","kinds","inherited","n_distinct","dependencies","most_common_vals","most_common_val_nulls","most_common_freqs","most_common_base_freqs"],"runtime_verified":false,"source":"english-manual"},"ManualEvidence":{"doc":{"anchor":"id-1.10.5.34.5","file":"view-pg-stats-ext.html","lang":"en","sha256":"9856c7727f22fb5303f09650d43c81c86e0ecb0e817d96cb75e40fcee9905c0a","slug":"18"}},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["schemaname","tablename","statistics_schemaname","statistics_name","statistics_owner","attnames","exprs","kinds","inherited","n_distinct","dependencies","most_common_vals","most_common_val_nulls","most_common_freqs","most_common_base_freqs"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_stats_ext","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_stats_ext","Summary":"视图pg_stats_ext提供对数据库中每个扩展统计对象的信息的访问，结合存储在pg_statistic_ext和 pg_statistic_ext_data目录中的信息。此视图仅允许访问与用户拥有的表相对应的pg_statistic_ext 和pg_statistic_ext_data行，因此可以安全地允许对此视图进行公共读访问。\n\npg_stats_ext也旨在以比底层目录更易读的格式呈现信息 — 代价是每当添加新类型的扩展统计信息到pg_statistic_ext时，必须扩展其模式。","BodyHTML":"\u003cp\u003e视图pg_stats_ext提供对数据库中每个扩展统计对象的信息的访问，结合存储在pg_statistic_ext和 pg_statistic_ext_data目录中的信息。此视图仅允许访问与用户拥有的表相对应的pg_statistic_ext 和pg_statistic_ext_data行，因此可以安全地允许对此视图进行公共读访问。\n\npg_stats_ext也旨在以比底层目录更易读的格式呈现信息 — 代价是每当添加新类型的扩展统计信息到pg_statistic_ext时，必须扩展其模式。\u003c/p\u003e","SourceRevision":"2026-09-27@419045e","ContentHash":"0bea5428b83b3b54dc0d7454787cd6a3f0b878b46e20123cc657942a956fed14","Payload":{"columns":[{"description_zh":"包含表的模式名称","name":"schemaname","type":"name","zh_from":"doc"},{"description_zh":"表的名称","name":"tablename","type":"name","zh_from":"doc"},{"description_zh":"包含扩展统计信息对象的模式名","name":"statistics_schemaname","type":"name","zh_from":"doc"},{"description_zh":"扩展统计信息对象的名称","name":"statistics_name","type":"name","zh_from":"doc"},{"description_zh":"扩展统计信息对象的所有者","name":"statistics_owner","type":"name","zh_from":"doc"},{"description_zh":"包含在扩展统计信息对象中的列的名称","name":"attnames","type":"name[]","zh_from":"doc"},{"description_zh":"包含在扩展统计信息对象中的表达式","name":"exprs","type":"text[]","zh_from":"doc"},{"description_zh":"为此记录启用的扩展统计信息对象的类型","name":"kinds","type":"\"char\"[]","zh_from":"doc"},{"description_zh":"如果为真，则统计信息包括子表中的值，而不仅仅是指定关系中的值","name":"inherited","type":"boolean","zh_from":"doc"},{"description_zh":"列值组合的非重复值计数。如果大于零，则为组合中不同值的估计数量。如果小于零，则为不同值数量除以行数的负值。（当ANALYZE 认为随着表的增长不同值的数量可能会增加时，使用负数形式；当该列似乎具有固定数量的可能值时，则使用正数形式。）例如，-1表示具有唯一性的列组合，其中不同组合的数量与行数相同。","name":"n_distinct","type":"pg_ndistinct","zh_from":"doc"},{"description_zh":"函数依赖统计信息","name":"dependencies","type":"pg_dependencies","zh_from":"doc"},{"description_zh":"列中高频值组合的列表（如果没有任何组合看起来比其他组合更常见，则为 NULL）。","name":"most_common_vals","type":"text[]","zh_from":"doc"},{"description_zh":"高频值组合的 NULL 标志列表（当 most_common_vals 为 NULL 时，此列为 NULL）。","name":"most_common_val_nulls","type":"boolean[]","zh_from":"doc"},{"description_zh":"高频值组合的频率列表，即每个组合的出现次数除以总行数（当 most_common_vals 为 NULL 时，此列为 NULL）。","name":"most_common_freqs","type":"double precision[]","zh_from":"doc"},{"description_zh":"高频值组合的基础频率列表，即各值频率的乘积（当 most_common_vals 为 NULL 时，此列为 NULL）。","name":"most_common_base_freqs","type":"double precision[]","zh_from":"doc"}],"description_zh":"视图pg_stats_ext提供对数据库中每个扩展统计对象的信息的访问，结合存储在pg_statistic_ext和 pg_statistic_ext_data目录中的信息。此视图仅允许访问与用户拥有的表相对应的pg_statistic_ext 和pg_statistic_ext_data行，因此可以安全地允许对此视图进行公共读访问。\n\npg_stats_ext也旨在以比底层目录更易读的格式呈现信息 — 代价是每当添加新类型的扩展统计信息到pg_statistic_ext时，必须扩展其模式。","zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["12","13","14","15","16","17","18","19","20"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
