Max Fonin <fonin@ziet.zhitomir.ua> writes:
> I guess the problem is that PL/pgSQL doesn't handle opaque type correctly.
No it doesn't, which is not surprising considering that opaque isn't
really a type at all. The error message could be improved though :-(
Currently I believe that the only way to write datatype I/O routines
is to do it in C, because what they really need to deal in is C-style
strings, and those are not an SQL-level type.
regards, tom lane