System Catalogs / System catalogs
pg_attrdef
Read the PG 18 manualThe 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.
| Column | Type | Description / reference |
|---|---|---|
oid | oidNOT NULL | Row identifier |
adrelid | oidNOT NULL | The table this column belongs to pg_class.oid |
adnum | int2NOT NULL | The number of the column pg_attribute.attnum |
adbin | pg_node_treeNOT NULL | The 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
Definition snapshot: english-manuals:b81a408327b8188f5fa59856a8b… · English manual source