You cannot create a user-defined cast between two built-in data types. You also cannot create a user-defined cast that includes any of the following data types:
In general, a cast between two data types requires that each data type represents an equal number of component values. For example, a cast between a row type and an opaque data type is possible if each field in the row type has a corresponding field in the opaque data type. When you want to perform conversions between two data types that have the same storage structure, you can use the CREATE CAST statement without a cast function. Otherwise, you must create a cast function that you then register with a CREATE CAST statement. For an example of how to use a cast function to create a user-defined cast, see Creating Cast Functions for User-Defined Casts.
Home | [ Top of Page | Previous Page | Next Page | Contents | Index ]