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

ColumnTypeDescription / reference
oidoidNOT NULLRow identifier
castsourceoidNOT NULLOID of the source data type
pg_type.oid
casttargetoidNOT NULLOID of the target data type
pg_type.oid
castfuncoidNOT NULLThe 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
castcontextcharNOT NULLIndicates 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.
castmethodcharNOT NULLIndicates 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
  1. 11 → 12 changed
  2. 9.6 → 10 reworded
  3. 9.1 → 9.2 reworded
  4. 8.4 → 9.0 reworded
  5. 8.3 → 8.4 changed
  6. 8.2 → 8.3 reworded
  7. 8.1 → 8.2 reworded
  8. 7.4 → 8.0 reworded

Definition snapshot: english-manuals:06160dbb2681f321547840547d2… · English manual source