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.

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

Columns 6

ColumnTypeDescription / reference
oidoidRow identifier
castsourceoidOID of the source data type
pg_type.oid
casttargetoidOID of the target data type
pg_type.oid
castfuncoidThe 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
castcontextcharIndicates 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.
castmethodcharIndicates 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 4
  1. PG 11 → 12changed
  2. PG 9.6 → 10changed
  3. PG 9.2 → 9.3changed
  4. PG 9.1 → 9.2changed

Definition snapshot: english-manuals:197c53ad24ef7329468e1185b5d… · English manual source