{"Entry":{"collection":"catalog","key":"pg_attribute","name":"pg_attribute","aliases":[],"metadata":{"changed_in":["8.0","8.4","9.0","9.1","9.2","10","11","12","14","16","17","18"],"changes":[{"added":[],"attributes":[],"description_changed":true,"descriptions":[],"from":"7.4","listing":[],"order":false,"removed":["attisset"],"status":"changed","to":"8.0","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Always -1 in storage, but when loaded into a row descriptor in memory this may be updated to cache the offset of the attribute within the row.","name":"attcacheoff","to":"Always -1 in storage, but when loaded into a row descriptor in memory this may be updated to cache the offset of the attribute within the row"},{"from":"This column has a default value, in which case there will be a corresponding entry in the pg_attrdef catalog that actually defines the value.","name":"atthasdef","to":"This column has a default value, in which case there will be a corresponding entry in the pg_attrdef catalog that actually defines the value"},{"from":"The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed.","name":"attinhcount","to":"The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed"},{"from":"This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL.","name":"attisdropped","to":"This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL"},{"from":"This column is defined locally in the relation. Note that a column may be locally defined and inherited simultaneously.","name":"attislocal","to":"This column is defined locally in the relation. Note that a column may be locally defined and inherited simultaneously"},{"from":"Number of dimensions, if the column is an array type; otherwise 0. (Presently, the number of dimensions of an array is not enforced, so any nonzero value effectively means \"it's an array\".)","name":"attndims","to":"Number of dimensions, if the column is an array type; otherwise 0. (Presently, the number of dimensions of an array is not enforced, so any nonzero value effectively means \"it's an array\")"},{"from":"This represents a not-null constraint. It is possible to change this column to enable or disable the constraint.","name":"attnotnull","to":"This represents a not-null constraint. It is possible to change this column to enable or disable the constraint"},{"from":"The number of the column. Ordinary columns are numbered from 1 up. System columns, such as oid, have (arbitrary) negative numbers.","name":"attnum","to":"The number of the column. Ordinary columns are numbered from 1 up. System columns, such as oid, have (arbitrary) negative numbers"},{"from":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of \"most common values\" to collect, and the target number of histogram bins to create.","name":"attstattarget","to":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of \"most common values\" to collect, and the target number of histogram bins to create"},{"from":"Normally a copy of pg_type.typstorage of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy.","name":"attstorage","to":"Normally a copy of pg_type.typstorage of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy"},{"from":"atttypmod records type-specific data supplied at table creation time (for example, the maximum length of a varchar column). It is passed to type-specific input functions and length coercion functions. The value will generally be -1 for types that do not need atttypmod.","name":"atttypmod","to":"atttypmod records type-specific data supplied at table creation time (for example, the maximum length of a varchar column). It is passed to type-specific input functions and length coercion functions. The value will generally be -1 for types that do not need atttypmod"}],"from":"8.1","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.2","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"Always -1 in storage, but when loaded into a row descriptor in memory this may be updated to cache the offset of the attribute within the row","name":"attcacheoff","to":"Always -1 in storage, but when loaded into a row descriptor in memory this might be updated to cache the offset of the attribute within the row"},{"from":"This column is defined locally in the relation. Note that a column may be locally defined and inherited simultaneously","name":"attislocal","to":"This column is defined locally in the relation. Note that a column can be locally defined and inherited simultaneously"}],"from":"8.2","listing":[],"order":false,"removed":[],"status":"reworded","to":"8.3","types":[],"unlisted":[]},{"added":["attacl"],"attributes":[],"description_changed":false,"descriptions":[],"from":"8.3","listing":[],"order":false,"removed":[],"status":"changed","to":"8.4","types":[],"unlisted":[]},{"added":["attoptions"],"attributes":[],"description_changed":false,"descriptions":[{"from":"This column has a default value, in which case there will be a corresponding entry in the pg_attrdef catalog that actually defines the value","name":"atthasdef","to":"This column has a default value, in which case there will be a corresponding entry in the pg_attrdef catalog that actually defines the value."},{"from":"The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed","name":"attinhcount","to":"The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed."},{"from":"This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL","name":"attisdropped","to":"This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL."},{"from":"This column is defined locally in the relation. Note that a column can be locally defined and inherited simultaneously","name":"attislocal","to":"This column is defined locally in the relation. Note that a column can be locally defined and inherited simultaneously."},{"from":"Number of dimensions, if the column is an array type; otherwise 0. (Presently, the number of dimensions of an array is not enforced, so any nonzero value effectively means \"it's an array\")","name":"attndims","to":"Number of dimensions, if the column is an array type; otherwise 0. (Presently, the number of dimensions of an array is not enforced, so any nonzero value effectively means \"it's an array\".)"},{"from":"This represents a not-null constraint. It is possible to change this column to enable or disable the constraint","name":"attnotnull","to":"This represents a not-null constraint. It is possible to change this column to enable or disable the constraint."},{"from":"The number of the column. Ordinary columns are numbered from 1 up. System columns, such as oid, have (arbitrary) negative numbers","name":"attnum","to":"The number of the column. Ordinary columns are numbered from 1 up. System columns, such as oid, have (arbitrary) negative numbers."},{"from":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of \"most common values\" to collect, and the target number of histogram bins to create","name":"attstattarget","to":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of \"most common values\" to collect, and the target number of histogram bins to create."},{"from":"Normally a copy of pg_type.typstorage of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy","name":"attstorage","to":"Normally a copy of pg_type.typstorage of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy."},{"from":"atttypmod records type-specific data supplied at table creation time (for example, the maximum length of a varchar column). It is passed to type-specific input functions and length coercion functions. The value will generally be -1 for types that do not need atttypmod","name":"atttypmod","to":"atttypmod records type-specific data supplied at table creation time (for example, the maximum length of a varchar column). It is passed to type-specific input functions and length coercion functions. The value will generally be -1 for types that do not need atttypmod."}],"from":"8.4","listing":[],"order":false,"removed":[],"status":"changed","to":"9.0","types":[],"unlisted":[]},{"added":["attcollation"],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.0","listing":[],"order":false,"removed":[],"status":"changed","to":"9.1","types":[],"unlisted":[]},{"added":["attfdwoptions"],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.1","listing":[],"order":false,"removed":[],"status":"changed","to":"9.2","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"This represents a not-null constraint. It is possible to change this column to enable or disable the constraint.","name":"attnotnull","to":"This represents a not-null constraint."}],"from":"9.4","listing":[],"order":false,"removed":[],"status":"reworded","to":"9.5","types":[],"unlisted":[]},{"added":["attidentity"],"attributes":[],"description_changed":false,"descriptions":[{"from":"Attribute-level foreign data wrapper options, as \"keyword=value\" strings","name":"attfdwoptions","to":"Attribute-level foreign data wrapper options, as “keyword=value” strings"},{"from":"Number of dimensions, if the column is an array type; otherwise 0. (Presently, the number of dimensions of an array is not enforced, so any nonzero value effectively means \"it's an array\".)","name":"attndims","to":"Number of dimensions, if the column is an array type; otherwise 0. (Presently, the number of dimensions of an array is not enforced, so any nonzero value effectively means “it's an array”.)"},{"from":"Attribute-level options, as \"keyword=value\" strings","name":"attoptions","to":"Attribute-level options, as “keyword=value” strings"},{"from":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of \"most common values\" to collect, and the target number of histogram bins to create.","name":"attstattarget","to":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of “most common values” to collect, and the target number of histogram bins to create."}],"from":"9.6","listing":[],"order":false,"removed":[],"status":"changed","to":"10","types":[],"unlisted":[]},{"added":["atthasmissing","attmissingval"],"attributes":[],"description_changed":false,"descriptions":[],"from":"10","listing":[],"order":false,"removed":[],"status":"changed","to":"11","types":[],"unlisted":[]},{"added":["attgenerated"],"attributes":[],"description_changed":false,"descriptions":[{"from":"This column has a default value, in which case there will be a corresponding entry in the pg_attrdef catalog that actually defines the value.","name":"atthasdef","to":"This column has a default expression or generation expression, in which case there will be a corresponding entry in the pg_attrdef catalog that actually defines the expression. (Check attgenerated to determine whether this is a default or a generation expression.)"},{"from":"The number of the column. Ordinary columns are numbered from 1 up. System columns, such as oid, have (arbitrary) negative numbers.","name":"attnum","to":"The number of the column. Ordinary columns are numbered from 1 up. System columns, such as ctid, have (arbitrary) negative numbers."}],"from":"11","listing":[],"order":false,"removed":[],"status":"changed","to":"12","types":[],"unlisted":[]},{"added":["attcompression"],"attributes":[],"description_changed":false,"descriptions":[{"from":"The defined collation of the column, or zero if the column is not of a collatable data type.","name":"attcollation","to":"The defined collation of the column, or zero if the column is not of a collatable data type"},{"from":"The data type of this column","name":"atttypid","to":"The data type of this column (zero for a dropped column)"}],"from":"13","listing":[],"order":true,"removed":[],"status":"changed","to":"14","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"15","listing":[],"order":true,"removed":[],"status":"changed","to":"16","types":[{"from":"int4","name":"attinhcount","to":"int2"},{"from":"int4","name":"attndims","to":"int2"},{"from":"int4","name":"attstattarget","to":"int2"}],"unlisted":[]},{"added":[],"attributes":[{"attribute":"not_null","from":true,"name":"attstattarget","to":false}],"description_changed":false,"descriptions":[{"from":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A negative value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of “most common values” to collect, and the target number of histogram bins to create.","name":"attstattarget","to":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A null value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of “most common values” to collect, and the target number of histogram bins to create."}],"from":"16","listing":[],"order":true,"removed":[],"status":"changed","to":"17","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":false,"descriptions":[{"from":"If a zero byte (''), then not a generated column. Otherwise, s = stored. (Other values might be added in the future.)","name":"attgenerated","to":"If a zero byte (''), then not a generated column. Otherwise, s = stored, v = virtual. A stored generated column is physically stored like a normal column. A virtual generated column is physically stored as a null value, with the actual value being computed at run time."},{"from":"This represents a not-null constraint.","name":"attnotnull","to":"This column has a (possibly invalid) not-null constraint."}],"from":"17","listing":[],"order":false,"removed":["attcacheoff"],"status":"changed","to":"18","types":[],"unlisted":[]}],"column_count":25,"content_hash":"2194012cce571afc98011fe2d3b5770ee17ef40b420b013e78847a448d44d8e7","derived_content_hash":"dca3d04046dfedbbffb2efa5c7fcd2d0bbf7b8e4a26bfdaea92f6740b8d76989","documentation_refresh":{"batch":"20261113","original_source_rev":"catalog-bilingual-repair:5f3d21cc11e795731c475667f9045e714fba547de9b4d24754f861d1b07ac4f1","versions":{"14":"14.25","15":"15.20","16":"16.16","17":"17.12","18":"18.7","19":"19rc2"}},"first_version":"7.4","imported_at":"2026-09-30T00:40:55.338998+08:00","kind":"catalog","last_version":"20","name":"pg_attribute","position":6,"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":"catalog-bilingual-repair:5f3d21cc11e795731c475667f9045e714fba547de9b4d24754f861d1b07ac4f1","summary":"The catalog pg_attribute stores information about table columns.","summary_zh":"目录 pg_attribute 存储关于表列的信息。数据库中每个表的每一列，在 pg_attribute 中都恰好有一行。（其中也包括索引的属性项，实际上，凡是在 pg_class 中有项的对象，都有对应的属性项。）"}},"Definition":{"Collection":"catalog","Key":"pg_attribute","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_attribute","SourceRevision":"catalog-bilingual-repair:5f3d21cc11e795731c475667f9045e714fba547de9b4d24754f861d1b07ac4f1","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"The table this column belongs to","description_zh":"此列所属的表","documented":true,"documented_name":"attrelid","hidden":false,"name":"attrelid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":2,"description":"The column name","description_zh":"列名称","documented":true,"documented_name":"attname","hidden":false,"name":"attname","not_null":true,"references":"","type":"name","type_modifier":-1,"type_oid":19,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":3,"description":"The data type of this column (zero for a dropped column)","description_zh":"此列的数据类型（删除的列为零）","documented":true,"documented_name":"atttypid","hidden":false,"name":"atttypid","not_null":true,"references":"pg_type.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":4,"description":"A copy of pg_type.typlen of this column's type","description_zh":"该列数据类型的 pg_type.typlen 副本","documented":true,"documented_name":"attlen","hidden":false,"name":"attlen","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":5,"description":"The number of the column. Ordinary columns are numbered from 1 up. System columns, such as ctid, have (arbitrary) negative numbers.","description_zh":"列的编号。一般列从 1 开始向上编号。系统列，如 ctid，则拥有（任意）负值编号。","documented":true,"documented_name":"attnum","hidden":false,"name":"attnum","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":6,"description":"atttypmod records type-specific data supplied at table creation time (for example, the maximum length of a varchar column). It is passed to type-specific input functions and length coercion functions. The value will generally be -1 for types that do not need atttypmod.","description_zh":"atttypmod 记录了在表创建时提供的类型相关数据（例如一个 varchar 列的最大长度）。它会被传递给类型相关的输入函数和长度强制转换函数。对于那些不需要 atttypmod 的类型，这个值通常为 -1。","documented":true,"documented_name":"atttypmod","hidden":false,"name":"atttypmod","not_null":true,"references":"","type":"int4","type_modifier":-1,"type_oid":23,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":7,"description":"Number of dimensions, if the column is an array type; otherwise 0. (Presently, the number of dimensions of an array is not enforced, so any nonzero value effectively means “it's an array”.)","description_zh":"如果该列是数组类型，则为维数；否则为 0。（目前并不会强制检查数组维数，因此任何非零值实际上都只意味着“这是一个数组”。）","documented":true,"documented_name":"attndims","hidden":false,"name":"attndims","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":8,"description":"A copy of pg_type.typbyval of this column's type","description_zh":"该列类型的 pg_type.typbyval 的一个拷贝","documented":true,"documented_name":"attbyval","hidden":false,"name":"attbyval","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":9,"description":"A copy of pg_type.typalign of this column's type","description_zh":"该列类型的 pg_type.typalign 的一个拷贝","documented":true,"documented_name":"attalign","hidden":false,"name":"attalign","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":10,"description":"Normally a copy of pg_type.typstorage of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy.","description_zh":"通常是该列类型的 pg_type.typstorage 的一个拷贝。对于可 TOAST 的数据类型，这可以在列创建后被修改以控制存储策略。","documented":true,"documented_name":"attstorage","hidden":false,"name":"attstorage","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":11,"description":"The current compression method of the column. Typically this is '\\0' to specify use of the current default setting (see default_toast_compression). Otherwise, 'p' selects pglz compression, while 'l' selects LZ4 compression. However, this field is ignored whenever attstorage does not allow compression.","description_zh":"该列当前的压缩方法。通常为'\\0'，表示使用当前默认设置（见 default_toast_compression）。否则，'p' 选择 pglz 压缩，而'l' 选择 LZ4 压缩。但是，当 attstorage 不允许压缩时，该字段会被忽略。","documented":true,"documented_name":"attcompression","hidden":false,"name":"attcompression","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":12,"description":"This column has a (possibly invalid) not-null constraint.","description_zh":"此列具有一个非空约束（可能尚未验证）","documented":true,"documented_name":"attnotnull","hidden":false,"name":"attnotnull","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":13,"description":"This column has a default expression or generation expression, in which case there will be a corresponding entry in the pg_attrdef catalog that actually defines the expression. (Check attgenerated to determine whether this is a default or a generation expression.)","description_zh":"该列有一个默认表达式或生成表达式，在此情况下在 pg_attrdef 目录中会有一个对应项来真正定义该表达式。（检查 attgenerated 以确定是默认还是生成表达式。）","documented":true,"documented_name":"atthasdef","hidden":false,"name":"atthasdef","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":14,"description":"This column has a value which is used where the column is entirely missing from the row, as happens when a column is added with a non-volatile DEFAULT value after the row is created. The actual value used is stored in the attmissingval column.","description_zh":"此列有一个值，供该列在数据行中完全缺失时使用；在数据行创建之后添加带有非易失性 DEFAULT 值的列时，就会出现这种情况。实际使用的值存储在 attmissingval 列中。","documented":true,"documented_name":"atthasmissing","hidden":false,"name":"atthasmissing","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":15,"description":"If a zero byte (''), then not an identity column. Otherwise, a = generated always, d = generated by default.","description_zh":"如果是一个零字节（''），则不是一个标识列。否则，a = 总是生成，d = 默认生成。","documented":true,"documented_name":"attidentity","hidden":false,"name":"attidentity","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":16,"description":"If a zero byte (''), then not a generated column. Otherwise, s = stored, v = virtual. A stored generated column is physically stored like a normal column. A virtual generated column is physically stored as a null value, with the actual value being computed at run time.","description_zh":"如果是零字节（''），则不是生成列。否则，s = 存储式（stored），v = 虚拟（virtual）。存储式生成列会像普通列一样实际存储；虚拟生成列则在物理上存储为空值，实际值在运行时计算。","documented":true,"documented_name":"attgenerated","hidden":false,"name":"attgenerated","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":17,"description":"This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL.","description_zh":"该列被删除且不再有效。一个删除的列仍然物理存在于表中，但是会被解析器忽略并因此无法通过 SQL 访问。","documented":true,"documented_name":"attisdropped","hidden":false,"name":"attisdropped","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":18,"description":"This column is defined locally in the relation. Note that a column can be locally defined and inherited simultaneously.","description_zh":"该列是由关系本地定义的。注意一个列可以同时是本地定义和继承的。","documented":true,"documented_name":"attislocal","hidden":false,"name":"attislocal","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":19,"description":"The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed.","description_zh":"该列直接祖先的数量。祖先数量非零的列不能被删除，也不能被重命名。","documented":true,"documented_name":"attinhcount","hidden":false,"name":"attinhcount","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":20,"description":"The defined collation of the column, or zero if the column is not of a collatable data type","description_zh":"该列定义的排序规则；如果该列的数据类型不支持排序规则，则为零。","documented":true,"documented_name":"attcollation","hidden":false,"name":"attcollation","not_null":true,"references":"pg_collation.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":21,"description":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A null value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of “most common values” to collect, and the target number of histogram bins to create.","description_zh":"attstattarget 控制 ANALYZE 为该列收集统计信息时的细节级别。零值表示不应收集统计信息。空值表示使用系统默认统计目标。正值的确切含义依赖于数据类型。对于标量数据类型，attstattarget 既是要收集的“高频值”目标个数，也是要创建的直方图桶目标个数。","documented":true,"documented_name":"attstattarget","hidden":false,"name":"attstattarget","not_null":false,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":22,"description":"Column-level access privileges, if any have been granted specifically on this column","description_zh":"列级访问权限，如果此列上已有特别授予的权限","documented":true,"documented_name":"attacl","hidden":false,"name":"attacl","not_null":false,"references":"","type":"aclitem[]","type_modifier":-1,"type_oid":1034,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":23,"description":"Attribute-level options, as “keyword=value” strings. Can also contain some internal options prefixed with pg_, which cannot be set via DDL. Currently the only internal option is pg_attver.","description_zh":"属性级选项，以“keyword=value”形式的字符串。还可能包含一些以 pg_ 为前缀的内部选项，这些选项不能通过 DDL 设置。目前唯一的内部选项是 pg_attver。","documented":true,"documented_name":"attoptions","hidden":false,"name":"attoptions","not_null":false,"references":"","type":"text[]","type_modifier":-1,"type_oid":1009,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":24,"description":"Attribute-level foreign data wrapper options, as “keyword=value” strings","description_zh":"属性级的外部数据包装器选项，以“keyword=value”形式的字符串","documented":true,"documented_name":"attfdwoptions","hidden":false,"name":"attfdwoptions","not_null":false,"references":"","type":"text[]","type_modifier":-1,"type_oid":1009,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":25,"description":"This column has a one element array containing the value used when the column is entirely missing from the row, as happens when the column is added with a non-volatile DEFAULT value after the row is created. The value is only used when atthasmissing is true. If there is no value the column is null.","description_zh":"此列包含一个单元素数组，其中的值供该列在数据行中完全缺失时使用；在数据行创建之后添加带有非易失性 DEFAULT 值的列时，就会出现这种情况。只有 atthasmissing 为真时才使用此值。如果没有这样的值，则此列为 NULL。","documented":true,"documented_name":"attmissingval","hidden":false,"name":"attmissingval","not_null":false,"references":"","type":"anyarray","type_modifier":-1,"type_oid":2277,"zh_from":"same-version-manual"}],"description":"The catalog pg_attribute stores information about table columns. There will be exactly one pg_attribute row for every column in every table in the database. (There will also be attribute entries for indexes, and indeed all objects that have pg_class entries.)\n\nThe term attribute is equivalent to column and is used for historical reasons.","description_zh":"目录 pg_attribute 存储关于表列的信息。数据库中每个表的每一列，在 pg_attribute 中都恰好有一行。（其中也包括索引的属性项，实际上，凡是在 pg_class 中有项的对象，都有对应的属性项。）\n\n术语属性等同于列，这里使用它只是出于历史原因。","description_zh_html":"\u003cp\u003e目录 pg_attribute 存储关于表列的信息。数据库中每个表的每一列，在 pg_attribute 中都恰好有一行。（其中也包括索引的属性项，实际上，凡是在 pg_class 中有项的对象，都有对应的属性项。）\n\n术语属性等同于列，这里使用它只是出于历史原因。\u003c/p\u003e\u003cdiv class=\"table\" id=\"id-1.10.4.9.5\"\u003e\u003cp class=\"title\"\u003e\u003cstrong\u003e表 52.7. \u003ccode class=\"structname\"\u003epg_attribute\u003c/code\u003e 列\u003c/strong\u003e\u003c/p\u003e\u003cdiv class=\"table-contents\"\u003e\u003ctable border=\"1\" class=\"table\" summary=\"pg_attribute 列\"\u003e\u003ccolgroup\u003e\u003ccol/\u003e\u003c/colgroup\u003e\u003cthead\u003e\u003ctr\u003e\u003cth class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n       列类型\n      \u003c/p\u003e\n\u003cp\u003e\n       描述\n      \u003c/p\u003e\u003c/th\u003e\u003c/tr\u003e\u003c/thead\u003e\u003ctbody\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattrelid\u003c/code\u003e \u003ccode class=\"type\"\u003eoid\u003c/code\u003e（引用 \u003ca class=\"link\" href=\"/zh/docs/18/catalog-pg-class.html\" title=\"52.11. pg_class\"\u003e\u003ccode class=\"structname\"\u003epg_class\u003c/code\u003e\u003c/a\u003e.\u003ccode class=\"structfield\"\u003eoid\u003c/code\u003e）\n      \u003c/p\u003e\n\u003cp\u003e\n       此列所属的表\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattname\u003c/code\u003e \u003ccode class=\"type\"\u003ename\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       列名称\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eatttypid\u003c/code\u003e \u003ccode class=\"type\"\u003eoid\u003c/code\u003e（引用 \u003ca class=\"link\" href=\"/zh/docs/18/catalog-pg-type.html\" title=\"52.64. pg_type\"\u003e\u003ccode class=\"structname\"\u003epg_type\u003c/code\u003e\u003c/a\u003e.\u003ccode class=\"structfield\"\u003eoid\u003c/code\u003e）\n      \u003c/p\u003e\n\u003cp\u003e\n       此列的数据类型（删除的列为零）\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattlen\u003c/code\u003e \u003ccode class=\"type\"\u003eint2\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       该列数据类型的 \u003ccode class=\"literal\"\u003epg_type.typlen\u003c/code\u003e 副本\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattnum\u003c/code\u003e \u003ccode class=\"type\"\u003eint2\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       列的编号。一般列从 1 开始向上编号。系统列，如 \u003ccode class=\"structfield\"\u003ectid\u003c/code\u003e，则拥有（任意）负值编号。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eatttypmod\u003c/code\u003e \u003ccode class=\"type\"\u003eint4\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n\u003ccode class=\"structfield\"\u003eatttypmod\u003c/code\u003e 记录了在表创建时提供的类型相关数据（例如一个 \u003ccode class=\"type\"\u003evarchar\u003c/code\u003e 列的最大长度）。它会被传递给类型相关的输入函数和长度强制转换函数。对于那些不需要 \u003ccode class=\"structfield\"\u003eatttypmod\u003c/code\u003e 的类型，这个值通常为 -1。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattndims\u003c/code\u003e \u003ccode class=\"type\"\u003eint2\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       如果该列是数组类型，则为维数；否则为 0。（目前并不会强制检查数组维数，因此任何非零值实际上都只意味着\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e这是一个数组\u003c/span\u003e”\u003c/span\u003e。）\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattbyval\u003c/code\u003e \u003ccode class=\"type\"\u003ebool\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       该列类型的 \u003ccode class=\"literal\"\u003epg_type.typbyval\u003c/code\u003e 的一个拷贝\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattalign\u003c/code\u003e \u003ccode class=\"type\"\u003echar\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       该列类型的 \u003ccode class=\"literal\"\u003epg_type.typalign\u003c/code\u003e 的一个拷贝\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattstorage\u003c/code\u003e \u003ccode class=\"type\"\u003echar\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       通常是该列类型的 \u003ccode class=\"literal\"\u003epg_type.typstorage\u003c/code\u003e 的一个拷贝。对于可 TOAST 的数据类型，这可以在列创建后被修改以控制存储策略。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattcompression\u003c/code\u003e \u003ccode class=\"type\"\u003echar\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       该列当前的压缩方法。通常为\u003ccode class=\"literal\"\u003e'\\0'\u003c/code\u003e，表示使用当前默认设置（见 \u003ca class=\"xref\" href=\"/zh/docs/18/runtime-config-client.html#GUC-DEFAULT-TOAST-COMPRESSION\"\u003edefault_toast_compression\u003c/a\u003e）。否则，\u003ccode class=\"literal\"\u003e'p'\u003c/code\u003e 选择 pglz 压缩，而\u003ccode class=\"literal\"\u003e'l'\u003c/code\u003e 选择 \u003cspan class=\"productname\"\u003eLZ4\u003c/span\u003e 压缩。但是，当 \u003ccode class=\"structfield\"\u003eattstorage\u003c/code\u003e 不允许压缩时，该字段会被忽略。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattnotnull\u003c/code\u003e \u003ccode class=\"type\"\u003ebool\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       此列具有一个非空约束（可能尚未验证）\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eatthasdef\u003c/code\u003e \u003ccode class=\"type\"\u003ebool\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       该列有一个默认表达式或生成表达式，在此情况下在 \u003ca class=\"link\" href=\"/zh/docs/18/catalog-pg-attrdef.html\" title=\"52.6. pg_attrdef\"\u003e\u003ccode class=\"structname\"\u003epg_attrdef\u003c/code\u003e\u003c/a\u003e 目录中会有一个对应项来真正定义该表达式。（检查 \u003ccode class=\"structfield\"\u003eattgenerated\u003c/code\u003e 以确定是默认还是生成表达式。）\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eatthasmissing\u003c/code\u003e \u003ccode class=\"type\"\u003ebool\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       此列有一个值，供该列在数据行中完全缺失时使用；在数据行创建之后添加带有非易失性 \u003ccode class=\"literal\"\u003eDEFAULT\u003c/code\u003e 值的列时，就会出现这种情况。实际使用的值存储在 \u003ccode class=\"structfield\"\u003eattmissingval\u003c/code\u003e 列中。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattidentity\u003c/code\u003e \u003ccode class=\"type\"\u003echar\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       如果是一个零字节（\u003ccode class=\"literal\"\u003e''\u003c/code\u003e），则不是一个标识列。否则，\u003ccode class=\"literal\"\u003ea\u003c/code\u003e = 总是生成，\u003ccode class=\"literal\"\u003ed\u003c/code\u003e = 默认生成。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattgenerated\u003c/code\u003e \u003ccode class=\"type\"\u003echar\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       如果是零字节（\u003ccode class=\"literal\"\u003e''\u003c/code\u003e），则不是生成列。否则，\u003ccode class=\"literal\"\u003es\u003c/code\u003e = 存储式（stored），\u003ccode class=\"literal\"\u003ev\u003c/code\u003e = 虚拟（virtual）。存储式生成列会像普通列一样实际存储；虚拟生成列则在物理上存储为空值，实际值在运行时计算。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattisdropped\u003c/code\u003e \u003ccode class=\"type\"\u003ebool\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       该列被删除且不再有效。一个删除的列仍然物理存在于表中，但是会被解析器忽略并因此无法通过 SQL 访问。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattislocal\u003c/code\u003e \u003ccode class=\"type\"\u003ebool\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       该列是由关系本地定义的。注意一个列可以同时是本地定义和继承的。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattinhcount\u003c/code\u003e \u003ccode class=\"type\"\u003eint2\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       该列直接祖先的数量。祖先数量非零的列不能被删除，也不能被重命名。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattcollation\u003c/code\u003e \u003ccode class=\"type\"\u003eoid\u003c/code\u003e（引用 \u003ca class=\"link\" href=\"/zh/docs/18/catalog-pg-collation.html\" title=\"52.12. pg_collation\"\u003e\u003ccode class=\"structname\"\u003epg_collation\u003c/code\u003e\u003c/a\u003e.\u003ccode class=\"structfield\"\u003eoid\u003c/code\u003e）\n      \u003c/p\u003e\n\u003cp\u003e\n       该列定义的排序规则；如果该列的数据类型不支持排序规则，则为零。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattstattarget\u003c/code\u003e \u003ccode class=\"type\"\u003eint2\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n\u003ccode class=\"structfield\"\u003eattstattarget\u003c/code\u003e 控制\n       \u003ca class=\"link\" href=\"/zh/docs/18/sql-analyze.html\" title=\"ANALYZE\"\u003e\u003ccode class=\"command\"\u003eANALYZE\u003c/code\u003e\u003c/a\u003e 为该列收集统计信息时的细节级别。零值表示不应收集统计信息。空值表示使用系统默认统计目标。正值的确切含义依赖于数据类型。对于标量数据类型，\u003ccode class=\"structfield\"\u003eattstattarget\u003c/code\u003e 既是要收集的\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003e高频值\u003c/span\u003e”\u003c/span\u003e目标个数，也是要创建的直方图桶目标个数。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattacl\u003c/code\u003e \u003ccode class=\"type\"\u003eaclitem[]\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       列级访问权限，如果此列上已有特别授予的权限\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattoptions\u003c/code\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       属性级选项，以\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003ekeyword=value\u003c/span\u003e”\u003c/span\u003e形式的字符串。还可能包含一些以 \u003ccode class=\"literal\"\u003epg_\u003c/code\u003e 为前缀的内部选项，这些选项不能通过 DDL 设置。目前唯一的内部选项是 \u003ccode class=\"literal\"\u003epg_attver\u003c/code\u003e。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattfdwoptions\u003c/code\u003e \u003ccode class=\"type\"\u003etext[]\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       属性级的外部数据包装器选项，以\u003cspan class=\"quote\"\u003e“\u003cspan class=\"quote\"\u003ekeyword=value\u003c/span\u003e”\u003c/span\u003e形式的字符串\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003ctr\u003e\u003ctd class=\"catalog_table_entry\"\u003e\u003cp class=\"column_definition\"\u003e\n\u003ccode class=\"structfield\"\u003eattmissingval\u003c/code\u003e \u003ccode class=\"type\"\u003eanyarray\u003c/code\u003e\n\u003c/p\u003e\n\u003cp\u003e\n       此列包含一个单元素数组，其中的值供该列在数据行中完全缺失时使用；在数据行创建之后添加带有非易失性 \u003ccode class=\"literal\"\u003eDEFAULT\u003c/code\u003e 值的列时，就会出现这种情况。只有 \u003ccode class=\"structfield\"\u003eatthasmissing\u003c/code\u003e 为真时才使用此值。如果没有这样的值，则此列为 NULL。\n      \u003c/p\u003e\u003c/td\u003e\u003c/tr\u003e\u003c/tbody\u003e\u003c/table\u003e\u003c/div\u003e\u003c/div\u003e","doc":{"anchor":"id-1.10.4.9.5","file":"catalog-pg-attribute.html","lang":"en","sha256":"a54194f1e2111ed06506faea6c22906a10f4d2e6851884fa7bed188e90e92d2d","slug":"18"},"documentation_revision":{"inputs":[{"file":"catalog-pg-attribute.html","kind":"same-version-reviewed-manual","locale":"en","sha256":"a54194f1e2111ed06506faea6c22906a10f4d2e6851884fa7bed188e90e92d2d","version":"18.7"},{"file":"catalog-pg-attribute.html","kind":"same-version-reviewed-manual","locale":"zh-Hans","sha256":"6fbfa9863358228978a2e89081e08dac1ab1866f05039c7ab2acd35a30d6c219","version":"18.7"}],"release":"18.7","runtime_remeasured":false,"source_revision":"pgdoc:b9f0e7232f60f380d642ac9b99226606c254b552"},"kind":"catalog","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["attrelid","attname","atttypid","attlen","attnum","atttypmod","attndims","attbyval","attalign","attstorage","attcompression","attnotnull","atthasdef","atthasmissing","attidentity","attgenerated","attisdropped","attislocal","attinhcount","attcollation","attstattarget","attacl","attoptions","attfdwoptions","attmissingval"],"runtime_verified":false,"source":"english-manual","sources":[{"evidence":[{"build_id":107,"kind":"same-version-manual","locale":"zh-Hans","page":"catalog-pg-attribute.html","sha256":"eaf8a646803358266fde0bcbe8b761fdc7ded1a0521328a5eefedb701af9c6a6","source_revision":"unknown:rendered-translation-baseline","translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","version":"18"}],"kind":"catalog-bilingual-repair","prior_source_revision":"english-manuals:c9787bd15fe88cbb9f99098096e731d4d8c609ca66feaeccbbc5bad688b0f57b","version":"18"}],"zh_from":"same-version-manual"},"ManualEvidence":{"doc":{"anchor":"id-1.10.4.9.5","file":"catalog-pg-attribute.html","lang":"en","sha256":"a54194f1e2111ed06506faea6c22906a10f4d2e6851884fa7bed188e90e92d2d","slug":"18"},"sources":[{"evidence":[{"build_id":107,"kind":"same-version-manual","locale":"zh-Hans","page":"catalog-pg-attribute.html","sha256":"eaf8a646803358266fde0bcbe8b761fdc7ded1a0521328a5eefedb701af9c6a6","source_revision":"unknown:rendered-translation-baseline","translation_revision":"git:b1b500221dbe5437cfca004d6b04d3f6e422765d;html-sha256:08e987a66af27b98444a8057c256314eafa13611a3fb9e888214fc436824244b","version":"18"}],"kind":"catalog-bilingual-repair","prior_source_revision":"english-manuals:c9787bd15fe88cbb9f99098096e731d4d8c609ca66feaeccbbc5bad688b0f57b","version":"18"}]},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["attrelid","attname","atttypid","attlen","attnum","atttypmod","attndims","attbyval","attalign","attstorage","attcompression","attnotnull","atthasdef","atthasmissing","attidentity","attgenerated","attisdropped","attislocal","attinhcount","attcollation","attstattarget","attacl","attoptions","attfdwoptions","attmissingval"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_attribute","SourceDatabase":"center","Version":"18","Locale":"en","Title":"pg_attribute","Summary":"The catalog pg_attribute stores information about table columns. There will be exactly one pg_attribute row for every column in every table in the database. (There will also be attribute entries for indexes, and indeed all objects that have pg_class entries.)\n\nThe term attribute is equivalent to column and is used for historical reasons.","BodyHTML":"\u003cp\u003eThe catalog pg_attribute stores information about table columns. There will be exactly one pg_attribute row for every column in every table in the database. (There will also be attribute entries for indexes, and indeed all objects that have pg_class entries.)\n\nThe term attribute is equivalent to column and is used for historical reasons.\u003c/p\u003e","SourceRevision":"catalog-bilingual-repair:5f3d21cc11e795731c475667f9045e714fba547de9b4d24754f861d1b07ac4f1","ContentHash":"a967a3915e0adaa282ad40a577ac757090f1096dc58555e4e4dfc9e8aaa407be","Payload":{"columns":[{"array_dimensions":0,"attnum":1,"description":"The table this column belongs to","description_zh":"此列所属的表","documented":true,"documented_name":"attrelid","hidden":false,"name":"attrelid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":2,"description":"The column name","description_zh":"列名称","documented":true,"documented_name":"attname","hidden":false,"name":"attname","not_null":true,"references":"","type":"name","type_modifier":-1,"type_oid":19,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":3,"description":"The data type of this column (zero for a dropped column)","description_zh":"此列的数据类型（删除的列为零）","documented":true,"documented_name":"atttypid","hidden":false,"name":"atttypid","not_null":true,"references":"pg_type.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":4,"description":"A copy of pg_type.typlen of this column's type","description_zh":"该列数据类型的 pg_type.typlen 副本","documented":true,"documented_name":"attlen","hidden":false,"name":"attlen","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":5,"description":"The number of the column. Ordinary columns are numbered from 1 up. System columns, such as ctid, have (arbitrary) negative numbers.","description_zh":"列的编号。一般列从 1 开始向上编号。系统列，如 ctid，则拥有（任意）负值编号。","documented":true,"documented_name":"attnum","hidden":false,"name":"attnum","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":6,"description":"atttypmod records type-specific data supplied at table creation time (for example, the maximum length of a varchar column). It is passed to type-specific input functions and length coercion functions. The value will generally be -1 for types that do not need atttypmod.","description_zh":"atttypmod 记录了在表创建时提供的类型相关数据（例如一个 varchar 列的最大长度）。它会被传递给类型相关的输入函数和长度强制转换函数。对于那些不需要 atttypmod 的类型，这个值通常为 -1。","documented":true,"documented_name":"atttypmod","hidden":false,"name":"atttypmod","not_null":true,"references":"","type":"int4","type_modifier":-1,"type_oid":23,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":7,"description":"Number of dimensions, if the column is an array type; otherwise 0. (Presently, the number of dimensions of an array is not enforced, so any nonzero value effectively means “it's an array”.)","description_zh":"如果该列是数组类型，则为维数；否则为 0。（目前并不会强制检查数组维数，因此任何非零值实际上都只意味着“这是一个数组”。）","documented":true,"documented_name":"attndims","hidden":false,"name":"attndims","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":8,"description":"A copy of pg_type.typbyval of this column's type","description_zh":"该列类型的 pg_type.typbyval 的一个拷贝","documented":true,"documented_name":"attbyval","hidden":false,"name":"attbyval","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":9,"description":"A copy of pg_type.typalign of this column's type","description_zh":"该列类型的 pg_type.typalign 的一个拷贝","documented":true,"documented_name":"attalign","hidden":false,"name":"attalign","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":10,"description":"Normally a copy of pg_type.typstorage of this column's type. For TOAST-able data types, this can be altered after column creation to control storage policy.","description_zh":"通常是该列类型的 pg_type.typstorage 的一个拷贝。对于可 TOAST 的数据类型，这可以在列创建后被修改以控制存储策略。","documented":true,"documented_name":"attstorage","hidden":false,"name":"attstorage","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":11,"description":"The current compression method of the column. Typically this is '\\0' to specify use of the current default setting (see default_toast_compression). Otherwise, 'p' selects pglz compression, while 'l' selects LZ4 compression. However, this field is ignored whenever attstorage does not allow compression.","description_zh":"该列当前的压缩方法。通常为'\\0'，表示使用当前默认设置（见 default_toast_compression）。否则，'p' 选择 pglz 压缩，而'l' 选择 LZ4 压缩。但是，当 attstorage 不允许压缩时，该字段会被忽略。","documented":true,"documented_name":"attcompression","hidden":false,"name":"attcompression","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":12,"description":"This column has a (possibly invalid) not-null constraint.","description_zh":"此列具有一个非空约束（可能尚未验证）","documented":true,"documented_name":"attnotnull","hidden":false,"name":"attnotnull","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":13,"description":"This column has a default expression or generation expression, in which case there will be a corresponding entry in the pg_attrdef catalog that actually defines the expression. (Check attgenerated to determine whether this is a default or a generation expression.)","description_zh":"该列有一个默认表达式或生成表达式，在此情况下在 pg_attrdef 目录中会有一个对应项来真正定义该表达式。（检查 attgenerated 以确定是默认还是生成表达式。）","documented":true,"documented_name":"atthasdef","hidden":false,"name":"atthasdef","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":14,"description":"This column has a value which is used where the column is entirely missing from the row, as happens when a column is added with a non-volatile DEFAULT value after the row is created. The actual value used is stored in the attmissingval column.","description_zh":"此列有一个值，供该列在数据行中完全缺失时使用；在数据行创建之后添加带有非易失性 DEFAULT 值的列时，就会出现这种情况。实际使用的值存储在 attmissingval 列中。","documented":true,"documented_name":"atthasmissing","hidden":false,"name":"atthasmissing","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":15,"description":"If a zero byte (''), then not an identity column. Otherwise, a = generated always, d = generated by default.","description_zh":"如果是一个零字节（''），则不是一个标识列。否则，a = 总是生成，d = 默认生成。","documented":true,"documented_name":"attidentity","hidden":false,"name":"attidentity","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":16,"description":"If a zero byte (''), then not a generated column. Otherwise, s = stored, v = virtual. A stored generated column is physically stored like a normal column. A virtual generated column is physically stored as a null value, with the actual value being computed at run time.","description_zh":"如果是零字节（''），则不是生成列。否则，s = 存储式（stored），v = 虚拟（virtual）。存储式生成列会像普通列一样实际存储；虚拟生成列则在物理上存储为空值，实际值在运行时计算。","documented":true,"documented_name":"attgenerated","hidden":false,"name":"attgenerated","not_null":true,"references":"","type":"char","type_modifier":-1,"type_oid":18,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":17,"description":"This column has been dropped and is no longer valid. A dropped column is still physically present in the table, but is ignored by the parser and so cannot be accessed via SQL.","description_zh":"该列被删除且不再有效。一个删除的列仍然物理存在于表中，但是会被解析器忽略并因此无法通过 SQL 访问。","documented":true,"documented_name":"attisdropped","hidden":false,"name":"attisdropped","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":18,"description":"This column is defined locally in the relation. Note that a column can be locally defined and inherited simultaneously.","description_zh":"该列是由关系本地定义的。注意一个列可以同时是本地定义和继承的。","documented":true,"documented_name":"attislocal","hidden":false,"name":"attislocal","not_null":true,"references":"","type":"bool","type_modifier":-1,"type_oid":16,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":19,"description":"The number of direct ancestors this column has. A column with a nonzero number of ancestors cannot be dropped nor renamed.","description_zh":"该列直接祖先的数量。祖先数量非零的列不能被删除，也不能被重命名。","documented":true,"documented_name":"attinhcount","hidden":false,"name":"attinhcount","not_null":true,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":20,"description":"The defined collation of the column, or zero if the column is not of a collatable data type","description_zh":"该列定义的排序规则；如果该列的数据类型不支持排序规则，则为零。","documented":true,"documented_name":"attcollation","hidden":false,"name":"attcollation","not_null":true,"references":"pg_collation.oid","type":"oid","type_modifier":-1,"type_oid":26,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":21,"description":"attstattarget controls the level of detail of statistics accumulated for this column by ANALYZE. A zero value indicates that no statistics should be collected. A null value says to use the system default statistics target. The exact meaning of positive values is data type-dependent. For scalar data types, attstattarget is both the target number of “most common values” to collect, and the target number of histogram bins to create.","description_zh":"attstattarget 控制 ANALYZE 为该列收集统计信息时的细节级别。零值表示不应收集统计信息。空值表示使用系统默认统计目标。正值的确切含义依赖于数据类型。对于标量数据类型，attstattarget 既是要收集的“高频值”目标个数，也是要创建的直方图桶目标个数。","documented":true,"documented_name":"attstattarget","hidden":false,"name":"attstattarget","not_null":false,"references":"","type":"int2","type_modifier":-1,"type_oid":21,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":22,"description":"Column-level access privileges, if any have been granted specifically on this column","description_zh":"列级访问权限，如果此列上已有特别授予的权限","documented":true,"documented_name":"attacl","hidden":false,"name":"attacl","not_null":false,"references":"","type":"aclitem[]","type_modifier":-1,"type_oid":1034,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":23,"description":"Attribute-level options, as “keyword=value” strings. Can also contain some internal options prefixed with pg_, which cannot be set via DDL. Currently the only internal option is pg_attver.","description_zh":"属性级选项，以“keyword=value”形式的字符串。还可能包含一些以 pg_ 为前缀的内部选项，这些选项不能通过 DDL 设置。目前唯一的内部选项是 pg_attver。","documented":true,"documented_name":"attoptions","hidden":false,"name":"attoptions","not_null":false,"references":"","type":"text[]","type_modifier":-1,"type_oid":1009,"zh_from":"same-version-manual"},{"array_dimensions":1,"attnum":24,"description":"Attribute-level foreign data wrapper options, as “keyword=value” strings","description_zh":"属性级的外部数据包装器选项，以“keyword=value”形式的字符串","documented":true,"documented_name":"attfdwoptions","hidden":false,"name":"attfdwoptions","not_null":false,"references":"","type":"text[]","type_modifier":-1,"type_oid":1009,"zh_from":"same-version-manual"},{"array_dimensions":0,"attnum":25,"description":"This column has a one element array containing the value used when the column is entirely missing from the row, as happens when the column is added with a non-volatile DEFAULT value after the row is created. The value is only used when atthasmissing is true. If there is no value the column is null.","description_zh":"此列包含一个单元素数组，其中的值供该列在数据行中完全缺失时使用；在数据行创建之后添加带有非易失性 DEFAULT 值的列时，就会出现这种情况。只有 atthasmissing 为真时才使用此值。如果没有这样的值，则此列为 NULL。","documented":true,"documented_name":"attmissingval","hidden":false,"name":"attmissingval","not_null":false,"references":"","type":"anyarray","type_modifier":-1,"type_oid":2277,"zh_from":"same-version-manual"}],"description":"The catalog pg_attribute stores information about table columns. There will be exactly one pg_attribute row for every column in every table in the database. (There will also be attribute entries for indexes, and indeed all objects that have pg_class entries.)\n\nThe term attribute is equivalent to column and is used for historical reasons."}},"RequestedLocale":"en","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}
