File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 33
33
* ENHANCEMENTS, OR MODIFICATIONS.
34
34
*
35
35
* IDENTIFICATION
36
- * $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.26 2001/11/05 17:46:39 momjian Exp $
36
+ * $Header: /cvsroot/pgsql/src/pl/plperl/plperl.c,v 1.27 2002/01/24 16:53:42 tgl Exp $
37
37
*
38
38
**********************************************************************/
39
39
@@ -488,9 +488,9 @@ plperl_func_handler(PG_FUNCTION_ARGS)
488
488
if (SPI_finish () != SPI_OK_FINISH )
489
489
elog (ERROR , "plperl: SPI_finish() failed" );
490
490
491
- /* XXX is this the approved way to check for an undef result? */
492
- if (perlret == & PL_sv_undef )
491
+ if (!(perlret && SvOK (perlret )))
493
492
{
493
+ /* return NULL if Perl code returned undef */
494
494
retval = (Datum ) 0 ;
495
495
fcinfo -> isnull = true;
496
496
}
You can’t perform that action at this time.
0 commit comments