51.6. pg_attrdef

The catalog pg_attrdef stores column default values. The main information about columns is stored in pg_attribute. Only columns for which a default value has been explicitly set will have an entry here.

Table 51.6. pg_attrdef Columns

oidoid Row identifier
adrelidoidpg_class.oidThe table this column belongs to
adnumint2pg_attribute.attnumThe number of the column
adbinpg_node_tree The column default value, in nodeToString() representation. Use pg_get_expr(adbin, adrelid) to convert it to an SQL expression.