Determine external representation
The external representation of an opaque data type is a character string. This string is the literal value for the opaque-type data.
A literal value can appear in SQL statements most anywhere that
the binary value can appear. For your opaque-type data to be valid
as a literal value in SQL statements, you must define its external
representation. It is important that the external representation be
reasonably intuitive and easy to enter.
Tip: The external
representation of an opaque data type is its ASCII representation.
Suppose you need to create an opaque type that holds information
about a circle. You can create the external representation that the
following figure shows for this circle.
With the external representation in External representation of the circle opaque
data type, an INSERT statement can
specify a literal value for a column of type circle with the
following format:
INSERT INTO tab1 (id_col, circle_col) VALUES (1, "(2, 3, 9)");
Similarly, when an opaque type has an external representation,
a client application such as (which displays results as character
data) can display a retrieved opaque-type value as part of the output
of the following query:
SELECT circle_col FROM tab1 WHERE id_col = 1;
In , the results of this query would display as follows:
(2, 3, 9)
Tip: The external representation of an opaque data type is handled
by its input and output support functions. For more information, see The input and output support functions.