Straight cast
A straight cast tells the database server that two data types have the same internal structure. With such a cast, the database server does not need to manipulate data to convert from the source data type to the target data type. Therefore, you do not need to specify a WITH clause in the CREATE CAST statement.
CREATE CAST (INT AS my_int)
CREATE CAST (my_int AS INT)
The first cast defines a valid conversion from INT to my_int, and the second cast defines a valid conversion from my_int to INT.
Built-in casts have no cast function associated with them. Because a distinct data type and its source data type have the same internal structure, distinct types do not require cast functions to be cast to their source data type. The database server automatically creates explicit casts between a distinct data type and its source data type.