Steven Blundy <sblundy@CLEMSON.EDU> writes:
> Changing opaque to text results in the CREATE FUNCTION statements
> working, while the CREATE TYPE statements throw a fit.
Yup. You cannot use SQL functions to write I/O operations for a new
datatype, because the I/O converters run at a lower logical level than
SQL. The only way to code them is in C.
regards, tom lane