Create casts for opaque data types

For each of the support functions in the following table, the database server uses a cast to convert the opaque data type to a particular internal data type.
Support function From To Type of cast
input LVARCHAR opaque data type implicit
output opaque data type LVARCHAR explicit
receive SENDRECV opaque data type implicit
send opaque data type SENDRECV explicit
import IMPEXP opaque data type implicit
export opaque data type IMPEXP explicit
importbinary IMPEXPBIN opaque data type implicit
exportbinary opaque data type IMPEXPBIN explicit
streamread STREAM opaque data type implicit
streamwrite opaque data type STREAM explicit

For the database server to perform these casts, you must create the casts with the CREATE CAST statement. The database server can then call the appropriate support function when it needs to cast opaque-type data to or from the LVARCHAR, SENDRECV, IMPEXP, IMPEXPBIN, or STREAM data types.

The CREATE CAST statement stores information about cast functions in the syscasts system catalog table. For more information about the CREATE CAST statement, see the description in the HCL OneDB™ Guide to SQL: Syntax. For a description of casting, see the HCL OneDB Guide to SQL: Tutorial.