System Catalogs / System catalogs
pg_cast
Read the PG 18 manualThe catalog pg_cast stores data type conversion paths, both built-in and user-defined.
Reading PG 18current·documented in 24 of 24 versions, 7.4 to 20
- Kind
- System catalogs
- Columns in this snapshot
- 6
- Definition source
- English manual
- Metadata snapshot
- 18.6
Columns 6
As listed in the PostgreSQL 18 manual.
| Column | Type | Description / reference |
|---|---|---|
oid | oidNOT NULL | Row identifier |
castsource | oidNOT NULL | OID of the source data type pg_type.oid |
casttarget | oidNOT NULL | OID of the target data type pg_type.oid |
castfunc | oidNOT NULL | The OID of the function to use to perform this cast. Zero is stored if the cast method doesn't require a function. pg_proc.oid |
castcontext | charNOT NULL | Indicates what contexts the cast can be invoked in. e means only as an explicit cast (using CAST or :: syntax). a means implicitly in assignment to a target column, as well as explicitly. i means implicitly in expressions, as well as the other cases. |
castmethod | charNOT NULL | Indicates how the cast is performed. f means that the function specified in the castfunc field is used. i means that the input/output functions are used. b means that the types are binary-coercible, thus no conversion is required. |
Column history across versions
Version history 8
Definition snapshot: english-manuals:06160dbb2681f321547840547d2… · English manual source