This was a random attempt to figure something out about min/max on row
types:
=> select min(a) from (values (row(1,2,3)), (row(3,4,5))) as x(a);
ERROR: 42809: record type has not been registered
LOCATION: lookup_rowtype_tupdesc_internal, typcache.c:341
I don't know whether it's supposed to work, but the error message
doesn't help much. Perhaps room for improvement?