Alex Pilosov <alex@pilosoft.com> writes:
> Currently, you must do:
> CREATE FUNCTION tabrecord (OID) returns tab1 AS '...
Right, "returns record" is bogus. The reason for the peculiar
error message seems to be that plpgsql is sloppy about checking
pg_type.typisdefined before believing that it has a valid type name.
I suspect this oversight is widespread :-(
regards, tom lane