select open change scope Open full search

PG.CENTER connects PostgreSQL documentation, reference, and ecosystem knowledge. Maintained by Pigsty.

SYSTEM CATALOGS / SYSTEM CATALOGS

The catalog pg_attrdef stores column default expressions and generation expressions.

Kind
System catalogs
Columns in this snapshot
4
Definition source
English manual

Columns 4

ColumnTypeDescription / reference
oidoidRow identifier
adrelidoidThe table this column belongs to
pg_class.oid
adnumint2The number of the column
pg_attribute.attnum
adbinpg_node_treeThe column default or generation expression, in nodeToString() representation. Use pg_get_expr(adbin, adrelid) to convert it to an SQL expression.
Column history across versions
Version history 4
  1. PG 17 → 18changed
  2. PG 11 → 12changed
  3. PG 9.2 → 9.3changed
  4. PG 9.0 → 9.1changed

Definition snapshot: english-manuals:0ab0946153655003cbe811793bc… · English manual source