pg_attrdef
pg_attrdef
表储存列的默认值,关于列的主要信息储存在pg_attribute中。
只有那些显式指定了默认值的列(在创建表或者添加列时)才会在该表中有一项。
Table 1. pg_catalog.pg_attrdef
列 | 类型 | 参考 | 描述 |
---|---|---|---|
adrelid |
oid | pg_class.oid | 该列所属的表 |
adnum |
int2 | pg_attribute.attnum | 列编号 |
adbin |
text | 列默认值的内部表示 | |
adsrc |
text | 人类可读的默认值表示。这个字段是历史遗留下来的,最好别用。A human-readable representation of the default value. |
Parent topic: 系统目录定义