Hello, I’m DocuDroid!
Submitting feedback
Thank you for rating our AI Search!
We would be grateful if you could share your thoughts so we can improve our AI Search for you and other readers.
GitHub

pg_cast

The pg_cast table stores data type conversion paths, both built-in paths and those defined with CREATE CAST.

Column Type References Description

castsource

oid

pg_type.oid

OID of the source data type

casttarget

oid

pg_type.oid

OID of the target data type

castfunc

oid

pg_proc.oid

The OID of the function to use to perform this cast. 0 is stored if the cast method does not require a function

castcontext

char

 — 

Indicates what contexts the cast may 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

char

 — 

Indicates how the cast is performed:

  • f — the function identified in the castfunc field is used.

  • i — the input/output functions are used.

  • b — the types are binary-coercible, and no conversion is required.