Choose the cast mechanism
The CREATE CAST statement can optionally specify the name of a cast function that implements the cast. The database server does not automatically perform data conversion on extended data types. You must specify a cast function if the two data types have different internal structures.
The database server can implement a cast with one of following
mechanisms:
- Perform a straight cast if two data types have internal structures that are the same
- Call a cast function to perform the data conversion