↑↓ 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.

Reading PG 18current·documented in 24 of 24 versions, 7.4 to 20

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

Columns 4

As listed in the PostgreSQL 18 manual.

ColumnTypeDescription / reference
oidoidNOT NULLRow identifier
adrelidoidNOT NULLThe table this column belongs to
pg_class.oid
adnumint2NOT NULLThe number of the column
pg_attribute.attnum
adbinpg_node_treeNOT NULLThe 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 3
  1. 17 → 18 reworded
  2. 11 → 12 changed
  3. 9.0 → 9.1 changed

Definition snapshot: english-manuals:b81a408327b8188f5fa59856a8b… · English manual source