pg_cast
Note that pg_cast
does not represent every type conversion known to the system, only those that cannot be deduced from some generic rule. For example, casting between a domain and its base type is not explicitly represented in pg_cast
. Another important exception is that “automatic I/O conversion casts”, those performed using a data type’s own I/O functions to convert to or from text
or other string types, are not explicitly represented in pg_cast
.
It is legitimate to create a pg_cast
entry in which the source and target types are the same, if the associated function takes more than one argument. Such entries represent ‘length coercion functions’ that coerce values of the type to be legal for a particular type modifier value.
Parent topic: System Catalogs Definitions