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