diff --git a/src/pl/plperl/plperl.c b/src/pl/plperl/plperl.c index 6754d5ac72..44becda3f3 100644 --- a/src/pl/plperl/plperl.c +++ b/src/pl/plperl/plperl.c @@ -1371,7 +1371,8 @@ plperl_validator(PG_FUNCTION_ARGS) &argtypes, &argnames, &argmodes); for (i = 0; i < numargs; i++) { - if (get_typtype(argtypes[i]) == TYPTYPE_PSEUDO) + if (get_typtype(argtypes[i]) == TYPTYPE_PSEUDO && + argtypes[i] != RECORDOID) ereport(ERROR, (errcode(ERRCODE_FEATURE_NOT_SUPPORTED), errmsg("PL/Perl functions cannot accept type %s", @@ -2105,7 +2106,8 @@ compile_plperl_function(Oid fn_oid, bool is_trigger) typeStruct = (Form_pg_type) GETSTRUCT(typeTup); /* Disallow pseudotype argument */ - if (typeStruct->typtype == TYPTYPE_PSEUDO) + if (typeStruct->typtype == TYPTYPE_PSEUDO && + procStruct->proargtypes.values[i] != RECORDOID) { free(prodesc->proname); free(prodesc); @@ -2115,7 +2117,8 @@ compile_plperl_function(Oid fn_oid, bool is_trigger) format_type_be(procStruct->proargtypes.values[i])))); } - if (typeStruct->typtype == TYPTYPE_COMPOSITE) + if (typeStruct->typtype == TYPTYPE_COMPOSITE || + procStruct->proargtypes.values[i] == RECORDOID) prodesc->arg_is_rowtype[i] = true; else {