|
33 | 33 | * ENHANCEMENTS, OR MODIFICATIONS. |
34 | 34 | * |
35 | 35 | * IDENTIFICATION |
36 | | - * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.85 2005/07/1201:16:21 tgl Exp $ |
| 36 | + * $PostgreSQL: pgsql/src/pl/plperl/plperl.c,v 1.86 2005/07/1220:35:42 tgl Exp $ |
37 | 37 | * |
38 | 38 | **********************************************************************/ |
39 | 39 |
|
@@ -1020,8 +1020,8 @@ plperl_func_handler(PG_FUNCTION_ARGS) |
1020 | 1020 | /* Return a perl string converted to a Datum */ |
1021 | 1021 | char*val; |
1022 | 1022 |
|
1023 | | - |
1024 | | -if (prodesc->fn_retisarray&&SvTYPE(SvRV(perlret))==SVt_PVAV) |
| 1023 | +if (prodesc->fn_retisarray&&SvROK(perlret)&& |
| 1024 | +SvTYPE(SvRV(perlret))==SVt_PVAV) |
1025 | 1025 | { |
1026 | 1026 | array_ret=plperl_convert_to_pg_array(perlret); |
1027 | 1027 | SvREFCNT_dec(perlret); |
|