treat changes the declared type of an expression.
You must have the EXECUTE object privilege on type to use this
function.
- If the declared type of expr is source_type, then type
must be some supertype or subtype of source_type. If the most specific
type of expr is type (or some subtype of type), then treat
returns expr. If the most specific type of expr is not
type (or some subtype of type), then treat returns NULL.
- If the declared type of expr is REF source_type, then
type must be some subtype or supertype of source_type. If the most
specific type of deref(expr) is type (or a subtype
of type), then treat returns expr. If the most specific
type of deref(expr) is not type (or a subtype of
type), then treat returns NULL.