{"Entry":{"collection":"catalog","key":"pg_statistic","name":"pg_statistic","aliases":[],"metadata":{"changed_in":["9.0","9.2","12"],"changes":[{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"The table that the described column belongs to","name":"starelid","to":"The table or index that the described column belongs to"}],"from":"7.4","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.0","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"The number of distinct nonnull data values in the column. A value greater than zero is the actual number of distinct values. A value less than zero is the negative of a fraction of the number of rows in the table (for example, a column in which values appear about twice on the average could be represented by stadistinct = -0.5). A zero value means the number of distinct values is unknown.","name":"stadistinct","to":"The number of distinct nonnull data values in the column. A value greater than zero is the actual number of distinct values. A value less than zero is the negative of a fraction of the number of rows in the table (for example, a column in which values appear about twice on the average could be represented by stadistinct = -0.5). A zero value means the number of distinct values is unknown"},{"from":"A code number indicating the kind of statistics stored in the Nth \"slot\" of the pg_statistic row.","name":"stakindN","to":"A code number indicating the kind of statistics stored in the Nth \"slot\" of the pg_statistic row"},{"from":"Numerical statistics of the appropriate kind for the Nth \"slot\", or null if the slot kind does not involve numerical values.","name":"stanumbersN","to":"Numerical statistics of the appropriate kind for the Nth \"slot\", or NULL if the slot kind does not involve numerical values"},{"from":"An operator used to derive the statistics stored in the Nth \"slot\". For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staopN","to":"An operator used to derive the statistics stored in the Nth \"slot\". For example, a histogram slot would show the \u003c operator that defines the sort order of the data"},{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavaluesN","to":"Column data values of the appropriate kind for the Nth \"slot\", or NULL if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, so there is no way to define these columns' type more specifically than anyarray"}],"from":"8.1","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.2","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[],"from":"8.2","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.3","types":[],"unlisted":[]},{"added":["stainherit"],"attributes":[],"description_changed":true,"descriptions":[{"from":"The number of distinct nonnull data values in the column. A value greater than zero is the actual number of distinct values. A value less than zero is the negative of a fraction of the number of rows in the table (for example, a column in which values appear about twice on the average could be represented by stadistinct = -0.5). A zero value means the number of distinct values is unknown","name":"stadistinct","to":"The number of distinct nonnull data values in the column. A value greater than zero is the actual number of distinct values. A value less than zero is the negative of a multiplier for the number of rows in the table; for example, a column in which values appear about twice on the average could be represented by stadistinct = -0.5. A zero value means the number of distinct values is unknown."}],"from":"8.4","listing":[],"order":false,"removed":[],"status":"changed","to":"9.0","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"The number of distinct nonnull data values in the column. A value greater than zero is the actual number of distinct values. A value less than zero is the negative of a multiplier for the number of rows in the table; for example, a column in which values appear about twice on the average could be represented by stadistinct = -0.5. A zero value means the number of distinct values is unknown.","name":"stadistinct","to":"The number of distinct nonnull data values in the column. A value greater than zero is the actual number of distinct values. A value less than zero is the negative of a multiplier for the number of rows in the table; for example, a column in which about 80% of the values are nonnull and each nonnull value appears about twice on average could be represented by stadistinct = -0.4. A zero value means the number of distinct values is unknown."}],"from":"9.0","listing":[],"order":false,"removed":[],"status":"reworded","to":"9.1","types":[],"unlisted":[]},{"added":["stakind5","staop5","stanumbers5","stavalues5"],"attributes":[],"description_changed":false,"descriptions":[{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavalues1","to":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray."},{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavalues2","to":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray."},{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavalues3","to":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray."},{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavalues4","to":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray."}],"from":"9.1","listing":[],"order":false,"removed":[],"status":"changed","to":"9.2","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"A code number indicating the kind of statistics stored in the Nth \"slot\" of the pg_statistic row.","name":"stakind1","to":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row."},{"from":"A code number indicating the kind of statistics stored in the Nth \"slot\" of the pg_statistic row.","name":"stakind2","to":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row."},{"from":"A code number indicating the kind of statistics stored in the Nth \"slot\" of the pg_statistic row.","name":"stakind3","to":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row."},{"from":"A code number indicating the kind of statistics stored in the Nth \"slot\" of the pg_statistic row.","name":"stakind4","to":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row."},{"from":"A code number indicating the kind of statistics stored in the Nth \"slot\" of the pg_statistic row.","name":"stakind5","to":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row."},{"from":"Numerical statistics of the appropriate kind for the Nth \"slot\", or null if the slot kind does not involve numerical values","name":"stanumbers1","to":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values"},{"from":"Numerical statistics of the appropriate kind for the Nth \"slot\", or null if the slot kind does not involve numerical values","name":"stanumbers2","to":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values"},{"from":"Numerical statistics of the appropriate kind for the Nth \"slot\", or null if the slot kind does not involve numerical values","name":"stanumbers3","to":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values"},{"from":"Numerical statistics of the appropriate kind for the Nth \"slot\", or null if the slot kind does not involve numerical values","name":"stanumbers4","to":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values"},{"from":"Numerical statistics of the appropriate kind for the Nth \"slot\", or null if the slot kind does not involve numerical values","name":"stanumbers5","to":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values"},{"from":"An operator used to derive the statistics stored in the Nth \"slot\". For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop1","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data."},{"from":"An operator used to derive the statistics stored in the Nth \"slot\". For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop2","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data."},{"from":"An operator used to derive the statistics stored in the Nth \"slot\". For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop3","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data."},{"from":"An operator used to derive the statistics stored in the Nth \"slot\". For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop4","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data."},{"from":"An operator used to derive the statistics stored in the Nth \"slot\". For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop5","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data."},{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavalues1","to":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray."},{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavalues2","to":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray."},{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavalues3","to":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray."},{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavalues4","to":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray."},{"from":"Column data values of the appropriate kind for the Nth \"slot\", or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","name":"stavalues5","to":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray."}],"from":"9.6","listing":[],"order":false,"removed":[],"status":"reworded","to":"10","types":[],"unlisted":[]},{"added":["stacoll1","stacoll2","stacoll3","stacoll4","stacoll5"],"attributes":[],"description_changed":false,"descriptions":[],"from":"11","listing":[],"order":false,"removed":[],"status":"changed","to":"12","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop1","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator."},{"from":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop2","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator."},{"from":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop3","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator."},{"from":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop4","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator."},{"from":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data.","name":"staop5","to":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator."}],"from":"13","listing":[],"order":false,"removed":[],"status":"reworded","to":"14","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"If true, the stats include inheritance child columns, not just the values in the specified relation","name":"stainherit","to":"If true, the stats include values from child tables, not just the values in the specified relation"}],"from":"14","listing":[],"order":false,"removed":[],"status":"reworded","to":"15","types":[],"unlisted":[]}],"column_count":11,"content_hash":"851331457f01974f759311033b4c16c7c598e740aa634b3568e9e4320b282407","first_version":"7.4","imported_at":"2026-09-30T00:40:56.155333+08:00","kind":"catalog","last_version":"20","name":"pg_statistic","position":130,"present_in":["7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"relation_oid":null,"relkind":"r","shared":false,"source_rev":"english-manuals:45dabd136acaefdef44754fd15fbcc7eb0788aebed49d02d676f5585f7636398","summary":"The catalog pg_statistic stores statistical data about the contents of the database.","summary_zh":""}},"Definition":{"Collection":"catalog","Key":"pg_statistic","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_statistic","SourceRevision":"english-manuals:45dabd136acaefdef44754fd15fbcc7eb0788aebed49d02d676f5585f7636398","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"The table or index that the described column belongs to","description_zh":"","documented":true,"documented_name":"starelid","hidden":false,"name":"starelid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":2,"description":"The number of the described column","description_zh":"","documented":true,"documented_name":"staattnum","hidden":false,"name":"staattnum","not_null":true,"references":"pg_attribute.attnum","type":"int2","type_modifier":-1,"type_oid":21},{"array_dimensions":0,"attnum":3,"description":"If true, the stats include values from child tables, not just the values in the specified relation","description_zh":"","documented":true,"documented_name":"stainherit","hidden":false,"name":"stainherit","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16},{"array_dimensions":0,"attnum":4,"description":"The fraction of the column's entries that are null","description_zh":"","documented":true,"documented_name":"stanullfrac","hidden":false,"name":"stanullfrac","not_null":true,"references":"","type":"float4","type_modifier":-1,"type_oid":700},{"array_dimensions":0,"attnum":5,"description":"The average stored width, in bytes, of nonnull entries","description_zh":"","documented":true,"documented_name":"stawidth","hidden":false,"name":"stawidth","not_null":true,"references":"","type":"int4","type_modifier":-1,"type_oid":23},{"array_dimensions":0,"attnum":6,"description":"The number of distinct nonnull data values in the column. A value greater than zero is the actual number of distinct values. A value less than zero is the negative of a multiplier for the number of rows in the table; for example, a column in which about 80% of the values are nonnull and each nonnull value appears about twice on average could be represented by stadistinct = -0.4. A zero value means the number of distinct values is unknown.","description_zh":"","documented":true,"documented_name":"stadistinct","hidden":false,"name":"stadistinct","not_null":true,"references":"","type":"float4","type_modifier":-1,"type_oid":700},{"array_dimensions":0,"attnum":7,"description":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row.","description_zh":"","documented":true,"documented_name":"stakindN","hidden":false,"name":"stakind1","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21},{"array_dimensions":0,"attnum":8,"description":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row.","description_zh":"","documented":true,"documented_name":"stakindN","hidden":false,"name":"stakind2","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21},{"array_dimensions":0,"attnum":9,"description":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row.","description_zh":"","documented":true,"documented_name":"stakindN","hidden":false,"name":"stakind3","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21},{"array_dimensions":0,"attnum":10,"description":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row.","description_zh":"","documented":true,"documented_name":"stakindN","hidden":false,"name":"stakind4","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21},{"array_dimensions":0,"attnum":11,"description":"A code number indicating the kind of statistics stored in the Nth “slot” of the pg_statistic row.","description_zh":"","documented":true,"documented_name":"stakindN","hidden":false,"name":"stakind5","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21},{"array_dimensions":0,"attnum":12,"description":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator.","description_zh":"","documented":true,"documented_name":"staopN","hidden":false,"name":"staop1","not_null":true,"references":"pg_operator.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":13,"description":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator.","description_zh":"","documented":true,"documented_name":"staopN","hidden":false,"name":"staop2","not_null":true,"references":"pg_operator.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":14,"description":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator.","description_zh":"","documented":true,"documented_name":"staopN","hidden":false,"name":"staop3","not_null":true,"references":"pg_operator.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":15,"description":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator.","description_zh":"","documented":true,"documented_name":"staopN","hidden":false,"name":"staop4","not_null":true,"references":"pg_operator.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":16,"description":"An operator used to derive the statistics stored in the Nth “slot”. For example, a histogram slot would show the \u003c operator that defines the sort order of the data. Zero if the statistics kind does not require an operator.","description_zh":"","documented":true,"documented_name":"staopN","hidden":false,"name":"staop5","not_null":true,"references":"pg_operator.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":17,"description":"The collation used to derive the statistics stored in the Nth “slot”. For example, a histogram slot for a collatable column would show the collation that defines the sort order of the data. Zero for noncollatable data.","description_zh":"","documented":true,"documented_name":"stacollN","hidden":false,"name":"stacoll1","not_null":true,"references":"pg_collation.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":18,"description":"The collation used to derive the statistics stored in the Nth “slot”. For example, a histogram slot for a collatable column would show the collation that defines the sort order of the data. Zero for noncollatable data.","description_zh":"","documented":true,"documented_name":"stacollN","hidden":false,"name":"stacoll2","not_null":true,"references":"pg_collation.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":19,"description":"The collation used to derive the statistics stored in the Nth “slot”. For example, a histogram slot for a collatable column would show the collation that defines the sort order of the data. Zero for noncollatable data.","description_zh":"","documented":true,"documented_name":"stacollN","hidden":false,"name":"stacoll3","not_null":true,"references":"pg_collation.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":20,"description":"The collation used to derive the statistics stored in the Nth “slot”. For example, a histogram slot for a collatable column would show the collation that defines the sort order of the data. Zero for noncollatable data.","description_zh":"","documented":true,"documented_name":"stacollN","hidden":false,"name":"stacoll4","not_null":true,"references":"pg_collation.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":21,"description":"The collation used to derive the statistics stored in the Nth “slot”. For example, a histogram slot for a collatable column would show the collation that defines the sort order of the data. Zero for noncollatable data.","description_zh":"","documented":true,"documented_name":"stacollN","hidden":false,"name":"stacoll5","not_null":true,"references":"pg_collation.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":1,"attnum":22,"description":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values","description_zh":"","documented":true,"documented_name":"stanumbersN","hidden":false,"name":"stanumbers1","not_null":false,"references":"","type":"float4[]","type_modifier":-1,"type_oid":1021},{"array_dimensions":1,"attnum":23,"description":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values","description_zh":"","documented":true,"documented_name":"stanumbersN","hidden":false,"name":"stanumbers2","not_null":false,"references":"","type":"float4[]","type_modifier":-1,"type_oid":1021},{"array_dimensions":1,"attnum":24,"description":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values","description_zh":"","documented":true,"documented_name":"stanumbersN","hidden":false,"name":"stanumbers3","not_null":false,"references":"","type":"float4[]","type_modifier":-1,"type_oid":1021},{"array_dimensions":1,"attnum":25,"description":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values","description_zh":"","documented":true,"documented_name":"stanumbersN","hidden":false,"name":"stanumbers4","not_null":false,"references":"","type":"float4[]","type_modifier":-1,"type_oid":1021},{"array_dimensions":1,"attnum":26,"description":"Numerical statistics of the appropriate kind for the Nth “slot”, or null if the slot kind does not involve numerical values","description_zh":"","documented":true,"documented_name":"stanumbersN","hidden":false,"name":"stanumbers5","not_null":false,"references":"","type":"float4[]","type_modifier":-1,"type_oid":1021},{"array_dimensions":0,"attnum":27,"description":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","description_zh":"","documented":true,"documented_name":"stavaluesN","hidden":false,"name":"stavalues1","not_null":false,"references":"","type":"anyarray","type_modifier":-1,"type_oid":2277},{"array_dimensions":0,"attnum":28,"description":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","description_zh":"","documented":true,"documented_name":"stavaluesN","hidden":false,"name":"stavalues2","not_null":false,"references":"","type":"anyarray","type_modifier":-1,"type_oid":2277},{"array_dimensions":0,"attnum":29,"description":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","description_zh":"","documented":true,"documented_name":"stavaluesN","hidden":false,"name":"stavalues3","not_null":false,"references":"","type":"anyarray","type_modifier":-1,"type_oid":2277},{"array_dimensions":0,"attnum":30,"description":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","description_zh":"","documented":true,"documented_name":"stavaluesN","hidden":false,"name":"stavalues4","not_null":false,"references":"","type":"anyarray","type_modifier":-1,"type_oid":2277},{"array_dimensions":0,"attnum":31,"description":"Column data values of the appropriate kind for the Nth “slot”, or null if the slot kind does not store any data values. Each array's element values are actually of the specific column's data type, or a related type such as an array's element type, so there is no way to define these columns' type more specifically than anyarray.","description_zh":"","documented":true,"documented_name":"stavaluesN","hidden":false,"name":"stavalues5","not_null":false,"references":"","type":"anyarray","type_modifier":-1,"type_oid":2277}],"description":"The catalog pg_statistic stores statistical data about the contents of the database. Entries are created by ANALYZE and subsequently used by the query planner. Note that all the statistical data is inherently approximate, even assuming that it is up-to-date.\n\nNormally there is one entry, with stainherit = false, for each table column that has been analyzed. If the table has inheritance children or partitions, a second entry with stainherit = true is also created. This row represents the column's statistics over the inheritance tree, i.e., statistics for the data you'd see with SELECT column FROM table*, whereas the stainherit = false row represents the results of SELECT column FROM ONLY table.\n\npg_statistic also stores statistical data about the values of index expressions. These are described as if they were actual data columns; in particular, starelid references the index. No entry is made for an ordinary non-expression index column, however, since it would be redundant with the entry for the underlying table column. Currently, entries for index expressions always have stainherit = false.\n\nSince different kinds of statistics might be appropriate for different kinds of data, pg_statistic is designed not to assume very much about what sort of statistics it stores. Only extremely general statistics (such as nullness) are given dedicated columns in pg_statistic. Everything else is stored in “slots”, which are groups of associated columns whose content is identified by a code number in one of the slot's columns. For more information see src/include/catalog/pg_statistic.h.\n\npg_statistic should not be readable by the public, since even statistical information about a table's contents might be considered sensitive. (Example: minimum and maximum values of a salary column might be quite interesting.) pg_stats is a publicly readable view on pg_statistic that only exposes information about those tables that are readable by the current user.","description_zh":"","doc":{"anchor":"id-1.10.4.53.8","file":"catalog-pg-statistic.html","lang":"en","sha256":"dcadf5066818bd3150d34c85ac0c32126e6a0631458bae6aa2b981f4de99c71d","slug":"18"},"kind":"catalog","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["starelid","staattnum","stainherit","stanullfrac","stawidth","stadistinct","stakind1","stakind2","stakind3","stakind4","stakind5","staop1","staop2","staop3","staop4","staop5","stacoll1","stacoll2","stacoll3","stacoll4","stacoll5","stanumbers1","stanumbers2","stanumbers3","stanumbers4","stanumbers5","stavalues1","stavalues2","stavalues3","stavalues4","stavalues5"],"runtime_verified":false,"source":"english-manual"},"ManualEvidence":{"doc":{"anchor":"id-1.10.4.53.8","file":"catalog-pg-statistic.html","lang":"en","sha256":"dcadf5066818bd3150d34c85ac0c32126e6a0631458bae6aa2b981f4de99c71d","slug":"18"}},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["starelid","staattnum","stainherit","stanullfrac","stawidth","stadistinct","stakind1","stakind2","stakind3","stakind4","stakind5","staop1","staop2","staop3","staop4","staop5","stacoll1","stacoll2","stacoll3","stacoll4","stacoll5","stanumbers1","stanumbers2","stanumbers3","stanumbers4","stanumbers5","stavalues1","stavalues2","stavalues3","stavalues4","stavalues5"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_statistic","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_statistic","Summary":"目录pg_statistic存储有关数据库内容的统计数据。其中的项由ANALYZE创建，查询规划器会使用这些数据来进行查询规划。注意所有的统计数据天然就是近似的，即使这些数据是最新的。\n\n通常，每个已分析的表列都有一个条目，其中stainherit = false。如果表具有继承子表或分区，则还会创建第二个条目，其中stainherit = true。此行表示继承树上列的统计信息，即你可以通过SELECT column FROM table*看到的数据的统计信息，而stainherit = false行表示SELECT column FROM ONLY table的结果。\n\npg_statistic也存储关于索引表达式值的统计数据，就好像它们是真正的数据列，但在这种情况中starelid指索引。对一个普通非表达式索引列不会创建项，因为它将是底层表列的项的冗余。当前，索引表达式的项都具有stainherit = false。\n\n由于不同种类的数据可能适合不同种类的统计信息，pg_statistic 在设计上尽量不对所存储的统计信息种类作出假定。只有极为通用的统计信息（例如空值情况）才在 pg_statistic 中有专用的列。其余统计信息都存储在“槽位”中。每个槽位都是一组相关的列，其内容由其中一列的代码编号来标识。更多信息见 src/include/catalog/pg_statistic.h。\n\npg_statistic不应公开可读，因为即使是表内容的统计信息也可能被认为是敏感的（例如，一个工资列的最大值和最小值就可能非常引人关注）。pg_stats是建立在pg_statistic之上的公开可读视图，它只会显示当前用户可读取的表的信息。","BodyHTML":"\u003cp\u003e目录pg_statistic存储有关数据库内容的统计数据。其中的项由ANALYZE创建，查询规划器会使用这些数据来进行查询规划。注意所有的统计数据天然就是近似的，即使这些数据是最新的。\n\n通常，每个已分析的表列都有一个条目，其中stainherit = false。如果表具有继承子表或分区，则还会创建第二个条目，其中stainherit = true。此行表示继承树上列的统计信息，即你可以通过SELECT column FROM table*看到的数据的统计信息，而stainherit = false行表示SELECT column FROM ONLY table的结果。\n\npg_statistic也存储关于索引表达式值的统计数据，就好像它们是真正的数据列，但在这种情况中starelid指索引。对一个普通非表达式索引列不会创建项，因为它将是底层表列的项的冗余。当前，索引表达式的项都具有stainherit = false。\n\n由于不同种类的数据可能适合不同种类的统计信息，pg_statistic 在设计上尽量不对所存储的统计信息种类作出假定。只有极为通用的统计信息（例如空值情况）才在 pg_statistic 中有专用的列。其余统计信息都存储在“槽位”中。每个槽位都是一组相关的列，其内容由其中一列的代码编号来标识。更多信息见 src/include/catalog/pg_statistic.h。\n\npg_statistic不应公开可读，因为即使是表内容的统计信息也可能被认为是敏感的（例如，一个工资列的最大值和最小值就可能非常引人关注）。pg_stats是建立在pg_statistic之上的公开可读视图，它只会显示当前用户可读取的表的信息。\u003c/p\u003e","SourceRevision":"2026-09-27@419045e","ContentHash":"0b87c94d95e2bf0ddb200f16be2796d63979027fde06093d724f19c698bc16c4","Payload":{"columns":[{"description_zh":"被描述列所属的表或索引","name":"starelid","type":"oid","zh_from":"doc"},{"description_zh":"被描述列的编号","name":"staattnum","type":"smallint","zh_from":"doc"},{"description_zh":"如果为真，则统计信息包括子表中的值，而不仅仅是指定关系中的值","name":"stainherit","type":"boolean","zh_from":"doc"},{"description_zh":"列中空值所占的比例","name":"stanullfrac","type":"real","zh_from":"doc"},{"description_zh":"非空项的平均存储宽度，以字节计","name":"stawidth","type":"integer","zh_from":"doc"},{"description_zh":"列中不同非空数据值的数量。一个大于零的值是不同值的真正数目。一个小于零的值是表中行数的乘数的负值；例如，对于一个约 80% 的值为非空且每个非空值平均出现两次的列，可以表示为stadistinct = -0.4。一个0值表示不同值的数目未知。","name":"stadistinct","type":"real","zh_from":"doc"},{"description_zh":"一个代码，它表示存储在该pg_statistic行中第N个“槽位”的统计类型。","name":"stakind1","type":"smallint","zh_from":"doc"},{"description_zh":"一个代码，它表示存储在该pg_statistic行中第N个“槽位”的统计类型。","name":"stakind2","type":"smallint","zh_from":"doc"},{"description_zh":"一个代码，它表示存储在该pg_statistic行中第N个“槽位”的统计类型。","name":"stakind3","type":"smallint","zh_from":"doc"},{"description_zh":"一个代码，它表示存储在该pg_statistic行中第N个“槽位”的统计类型。","name":"stakind4","type":"smallint","zh_from":"doc"},{"description_zh":"一个代码，它表示存储在该pg_statistic行中第N个“槽位”的统计类型。","name":"stakind5","type":"smallint","zh_from":"doc"},{"description_zh":"一个用于生成这些存储在第N个“槽位”的统计信息的操作符。例如，直方图槽位会使用\u003c操作符，该操作符定义了这些数据的排序顺序。如果统计类型不需要操作符则为零。","name":"staop1","type":"oid","zh_from":"doc"},{"description_zh":"一个用于生成这些存储在第N个“槽位”的统计信息的操作符。例如，直方图槽位会使用\u003c操作符，该操作符定义了这些数据的排序顺序。如果统计类型不需要操作符则为零。","name":"staop2","type":"oid","zh_from":"doc"},{"description_zh":"一个用于生成这些存储在第N个“槽位”的统计信息的操作符。例如，直方图槽位会使用\u003c操作符，该操作符定义了这些数据的排序顺序。如果统计类型不需要操作符则为零。","name":"staop3","type":"oid","zh_from":"doc"},{"description_zh":"一个用于生成这些存储在第N个“槽位”的统计信息的操作符。例如，直方图槽位会使用\u003c操作符，该操作符定义了这些数据的排序顺序。如果统计类型不需要操作符则为零。","name":"staop4","type":"oid","zh_from":"doc"},{"description_zh":"一个用于生成这些存储在第N个“槽位”的统计信息的操作符。例如，直方图槽位会使用\u003c操作符，该操作符定义了这些数据的排序顺序。如果统计类型不需要操作符则为零。","name":"staop5","type":"oid","zh_from":"doc"},{"description_zh":"用于生成存储在第N个“槽位”中的统计信息的排序规则。例如，支持排序规则的列的直方图槽会显示定义数据排序顺序的排序规则。对于不支持排序规则的数据，则为零。","name":"stacoll1","type":"oid","zh_from":"doc"},{"description_zh":"用于生成存储在第N个“槽位”中的统计信息的排序规则。例如，支持排序规则的列的直方图槽会显示定义数据排序顺序的排序规则。对于不支持排序规则的数据，则为零。","name":"stacoll2","type":"oid","zh_from":"doc"},{"description_zh":"用于生成存储在第N个“槽位”中的统计信息的排序规则。例如，支持排序规则的列的直方图槽会显示定义数据排序顺序的排序规则。对于不支持排序规则的数据，则为零。","name":"stacoll3","type":"oid","zh_from":"doc"},{"description_zh":"用于生成存储在第N个“槽位”中的统计信息的排序规则。例如，支持排序规则的列的直方图槽会显示定义数据排序顺序的排序规则。对于不支持排序规则的数据，则为零。","name":"stacoll4","type":"oid","zh_from":"doc"},{"description_zh":"用于生成存储在第N个“槽位”中的统计信息的排序规则。例如，支持排序规则的列的直方图槽会显示定义数据排序顺序的排序规则。对于不支持排序规则的数据，则为零。","name":"stacoll5","type":"oid","zh_from":"doc"},{"description_zh":"第N个“槽位”中相应种类的数值统计信息；如果该槽位种类不涉及数值，则为 NULL","name":"stanumbers1","type":"real[]","zh_from":"doc"},{"description_zh":"第N个“槽位”中相应种类的数值统计信息；如果该槽位种类不涉及数值，则为 NULL","name":"stanumbers2","type":"real[]","zh_from":"doc"},{"description_zh":"第N个“槽位”中相应种类的数值统计信息；如果该槽位种类不涉及数值，则为 NULL","name":"stanumbers3","type":"real[]","zh_from":"doc"},{"description_zh":"第N个“槽位”中相应种类的数值统计信息；如果该槽位种类不涉及数值，则为 NULL","name":"stanumbers4","type":"real[]","zh_from":"doc"},{"description_zh":"第N个“槽位”中相应种类的数值统计信息；如果该槽位种类不涉及数值，则为 NULL","name":"stanumbers5","type":"real[]","zh_from":"doc"},{"description_zh":"第N个“槽位”所需的相应种类的列数据值，如果该槽位类型不存储任何数据值则为 NULL。每个数组的元素值实际上都是指定列的数据类型或者是一个相关类型（如数组元素类型），因此，无法把这些列的类型定义得比anyarray更具体。","name":"stavalues1","type":"anyarray","zh_from":"doc"},{"description_zh":"第N个“槽位”所需的相应种类的列数据值，如果该槽位类型不存储任何数据值则为 NULL。每个数组的元素值实际上都是指定列的数据类型或者是一个相关类型（如数组元素类型），因此，无法把这些列的类型定义得比anyarray更具体。","name":"stavalues2","type":"anyarray","zh_from":"doc"},{"description_zh":"第N个“槽位”所需的相应种类的列数据值，如果该槽位类型不存储任何数据值则为 NULL。每个数组的元素值实际上都是指定列的数据类型或者是一个相关类型（如数组元素类型），因此，无法把这些列的类型定义得比anyarray更具体。","name":"stavalues3","type":"anyarray","zh_from":"doc"},{"description_zh":"第N个“槽位”所需的相应种类的列数据值，如果该槽位类型不存储任何数据值则为 NULL。每个数组的元素值实际上都是指定列的数据类型或者是一个相关类型（如数组元素类型），因此，无法把这些列的类型定义得比anyarray更具体。","name":"stavalues4","type":"anyarray","zh_from":"doc"},{"description_zh":"第N个“槽位”所需的相应种类的列数据值，如果该槽位类型不存储任何数据值则为 NULL。每个数组的元素值实际上都是指定列的数据类型或者是一个相关类型（如数组元素类型），因此，无法把这些列的类型定义得比anyarray更具体。","name":"stavalues5","type":"anyarray","zh_from":"doc"}],"description_zh":"目录pg_statistic存储有关数据库内容的统计数据。其中的项由ANALYZE创建，查询规划器会使用这些数据来进行查询规划。注意所有的统计数据天然就是近似的，即使这些数据是最新的。\n\n通常，每个已分析的表列都有一个条目，其中stainherit = false。如果表具有继承子表或分区，则还会创建第二个条目，其中stainherit = true。此行表示继承树上列的统计信息，即你可以通过SELECT column FROM table*看到的数据的统计信息，而stainherit = false行表示SELECT column FROM ONLY table的结果。\n\npg_statistic也存储关于索引表达式值的统计数据，就好像它们是真正的数据列，但在这种情况中starelid指索引。对一个普通非表达式索引列不会创建项，因为它将是底层表列的项的冗余。当前，索引表达式的项都具有stainherit = false。\n\n由于不同种类的数据可能适合不同种类的统计信息，pg_statistic 在设计上尽量不对所存储的统计信息种类作出假定。只有极为通用的统计信息（例如空值情况）才在 pg_statistic 中有专用的列。其余统计信息都存储在“槽位”中。每个槽位都是一组相关的列，其内容由其中一列的代码编号来标识。更多信息见 src/include/catalog/pg_statistic.h。\n\npg_statistic不应公开可读，因为即使是表内容的统计信息也可能被认为是敏感的（例如，一个工资列的最大值和最小值就可能非常引人关注）。pg_stats是建立在pg_statistic之上的公开可读视图，它只会显示当前用户可读取的表的信息。","zh_from":"doc"}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","7.4","8.0","8.1","8.2","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
