This was documented with pg_attribute but not with pg_attrdef.
Reported-by: jian he
Discussion: https://www.postgresql.org/message-id/CACJufxE+E-iYmBnZVZHiYA+WpyZZVv7BfiBLpo=T70EZHDU9rw@mail.gmail.com
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.
+ expressions and generation expressions. The main information about columns
+ is stored in
+ linkend="catalog-pg-attribute">pg_attribute.
+ Only columns for which a default expression or generation expression has
+ been explicitly set will have an entry here.
adbin pg_node_tree
- The column default value, in nodeToString()
+ The column default or generation expression, in nodeToString()
representation. Use pg_get_expr(adbin, adrelid) to
convert it to an SQL expression.