Re: PL/Perl list value return causes segfault

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: PL/Perl list value return causes segfault
Date: 2005-07-12 23:59:18
Message-ID: 20050712235917.GA87056@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers pgsql-patches

On Tue, Jul 12, 2005 at 02:59:37PM -0400, Andrew Dunstan wrote:
>
> Note that all plperl functions are called in scalar context, and it is
> always wrong to return a list (as opposed to a listref). In fact, the
> value received might surprise you even if it worked (it would be the
> value of the last member of the list).

Yeah, I knew that returning a list was contrary to what was expected, but
I wanted to see what would happen. I wasn't expecting a core dump :-(
Thanks for the patch.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

Browse pgsql-docs by date

  From Date Subject
Next Message Neil Conway 2005-07-13 02:17:05 Re: [PATCHES] Doc patch: New PL/Perl Features
Previous Message Andrew Dunstan 2005-07-12 22:41:53 Re: PL/Perl list value return causes segfault

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2005-07-13 02:10:22 Re: [PATCHES] HEAD doesn't cope with libraries in non-default
Previous Message Andrew Dunstan 2005-07-12 22:41:53 Re: PL/Perl list value return causes segfault

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2005-07-13 02:10:22 Re: [PATCHES] HEAD doesn't cope with libraries in non-default
Previous Message Alvaro Herrera 2005-07-12 23:34:55 Re: Autovacuum integration