The assign() support function
The database server calls the assign() support function for an opaque type when a value is ready to be inserted into an opaque-type column (INSERT, UPDATE, or LOAD).
The assign() support function accepts
the server internal representation of the opaque type and returns
the appropriate disk internal representation for that type, as the
following signature shows:
disk_internal_rep assign(internal_rep);
- disk_internal_rep
- The appropriate format for the disk internal representation of the opaque data type. The passing mechanism of this return value depends on the kind of opaque type. For more information, see Determine the passing mechanism for an opaque type. The disk internal representation is the internal format as modified by the assign() support function. This format is what the database server writes to the database table.
- internal_rep
- The appropriate format for the server internal representation
of the opaque data type. The passing mechanism of this return value
depends on the kind of opaque type. For more information, see Determine the passing mechanism for an opaque type. The server internal
representation is the representation that the input support function
returns. Tip: Unlike most opaque-type support functions, the assign() function for an opaque type must have the explicit name “assign” when you register it with the CREATE FUNCTION statement. No implicit casting occurs when the database server resolves this function. However, it is recommended that you include the name of the opaque type in the C-language version of its assign() function.