{"Entry":{"collection":"catalog","key":"pg_attrdef","name":"pg_attrdef","aliases":[],"metadata":{"changed_in":["9.1","12"],"changes":[{"added":[],"attributes":[],"description_changed":false,"descriptions":[],"from":"9.0","listing":[],"order":false,"removed":[],"status":"changed","to":"9.1","types":[{"from":"text","name":"adbin","to":"pg_node_tree"}],"unlisted":[]},{"added":[],"attributes":[{"attribute":"not_null","from":false,"name":"adbin","to":true},{"attribute":"hidden","from":true,"name":"oid","to":false}],"description_changed":true,"descriptions":[{"from":"The internal representation of the column default value","name":"adbin","to":"The column default value, in nodeToString() representation. Use pg_get_expr(adbin, adrelid) to convert it to an SQL expression."}],"from":"11","listing":[],"order":false,"removed":["adsrc"],"status":"changed","to":"12","types":[],"unlisted":[]},{"added":[],"attributes":[],"description_changed":true,"descriptions":[{"from":"The column default value, in nodeToString() representation. Use pg_get_expr(adbin, adrelid) to convert it to an SQL expression.","name":"adbin","to":"The column default or generation expression, in nodeToString() representation. Use pg_get_expr(adbin, adrelid) to convert it to an SQL expression."}],"from":"17","listing":[],"order":false,"removed":[],"status":"reworded","to":"18","types":[],"unlisted":[]}],"column_count":4,"content_hash":"afa948e49c31506f076f4a6e1e7465ebeee4f7698e94921bf47a43222ff73656","first_version":"7.4","imported_at":"2026-09-30T00:40:55.329228+08:00","kind":"catalog","last_version":"20","name":"pg_attrdef","position":5,"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:b81a408327b8188f5fa59856a8b1162a81d235da44b714639308998c4d16df3c","summary":"The catalog pg_attrdef stores column default expressions and generation expressions.","summary_zh":""}},"Definition":{"Collection":"catalog","Key":"pg_attrdef","SourceDatabase":"center","Version":"18","SourceTable":"catalog","SourceKey":"pg_attrdef","SourceRevision":"english-manuals:b81a408327b8188f5fa59856a8b1162a81d235da44b714639308998c4d16df3c","Facts":{"columns":[{"array_dimensions":0,"attnum":1,"description":"Row identifier","description_zh":"","documented":true,"documented_name":"oid","hidden":false,"name":"oid","not_null":true,"references":"","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":2,"description":"The table this column belongs to","description_zh":"","documented":true,"documented_name":"adrelid","hidden":false,"name":"adrelid","not_null":true,"references":"pg_class.oid","type":"oid","type_modifier":-1,"type_oid":26},{"array_dimensions":0,"attnum":3,"description":"The number of the column","description_zh":"","documented":true,"documented_name":"adnum","hidden":false,"name":"adnum","not_null":true,"references":"pg_attribute.attnum","type":"int2","type_modifier":-1,"type_oid":21},{"array_dimensions":0,"attnum":4,"description":"The column default or generation expression, in nodeToString() representation. Use pg_get_expr(adbin, adrelid) to convert it to an SQL expression.","description_zh":"","documented":true,"documented_name":"adbin","hidden":false,"name":"adbin","not_null":true,"references":"","type":"pg_node_tree","type_modifier":-1,"type_oid":194}],"description":"The catalog pg_attrdef stores column default expressions and generation expressions. The main information about columns is stored in pg_attribute. Only columns for which a default expression or generation expression has been explicitly set will have an entry here.","description_zh":"","doc":{"anchor":"id-1.10.4.8.4","file":"catalog-pg-attrdef.html","lang":"en","sha256":"8cf6afeedabd33b9758a0abd99923e7fdf1ffadc0c6c484d5ac9d7e090f08e83","slug":"18"},"kind":"catalog","lang":"en","measured_attributes":true,"metadata_release":"18.6","runtime_columns":["oid","adrelid","adnum","adbin"],"runtime_verified":false,"source":"english-manual"},"ManualEvidence":{"doc":{"anchor":"id-1.10.4.8.4","file":"catalog-pg-attrdef.html","lang":"en","sha256":"8cf6afeedabd33b9758a0abd99923e7fdf1ffadc0c6c484d5ac9d7e090f08e83","slug":"18"}},"MeasuredEvidence":{"measured_attributes":true,"metadata_release":"18.6","runtime_columns":["oid","adrelid","adnum","adbin"],"runtime_verified":false}},"Text":{"Collection":"catalog","Key":"pg_attrdef","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"pg_attrdef","Summary":"目录pg_attrdef存储列默认表达式和生成表达式。列的主要信息存储在pg_attribute中。只有显式设置了默认表达式或生成表达式的列，才会在此目录中有条目。","BodyHTML":"\u003cp\u003e目录pg_attrdef存储列默认表达式和生成表达式。列的主要信息存储在pg_attribute中。只有显式设置了默认表达式或生成表达式的列，才会在此目录中有条目。\u003c/p\u003e","SourceRevision":"2026-09-27@419045e","ContentHash":"2d862309d947319508959a8f848dec8af4bf637c4cb80db96222ab3d7a42e186","Payload":{"columns":[{"description_zh":"行标识符","name":"oid","type":"oid","zh_from":"doc"},{"description_zh":"该列所属的表","name":"adrelid","type":"oid","zh_from":"doc"},{"description_zh":"列的编号","name":"adnum","type":"smallint","zh_from":"doc"},{"description_zh":"列默认表达式或生成表达式的内部表示，采用 nodeToString() 的输出格式。可使用 pg_get_expr(adbin, adrelid) 将其转换为 SQL 表达式。","name":"adbin","type":"pg_node_tree","zh_from":"doc"}],"description_zh":"目录pg_attrdef存储列默认表达式和生成表达式。列的主要信息存储在pg_attribute中。只有显式设置了默认表达式或生成表达式的列，才会在此目录中有条目。","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}
