Re: Segfault from PL/Perl Returning vstring

From: Tim Bunce <Tim(dot)Bunce(at)pobox(dot)com>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "David E(dot) Wheeler" <david(at)kineticode(dot)com>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Segfault from PL/Perl Returning vstring
Date: 2009-12-21 22:13:43
Message-ID: 20091221221343.GI15262@timac.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Dec 21, 2009 at 02:46:17PM -0500, Andrew Dunstan wrote:
>
>
> David E. Wheeler wrote:
>> At least I think it's a segfault. This function returns a vstring:
>>
>> CREATE OR REPLACE FUNCTION wtf(
>> ) RETURNS text LANGUAGE plperl IMMUTABLE STRICT AS $X$
>> return $^V;
>> $X$;
>>
>> Here's what happens when I call it:
>>
>> try=# select wtf();
>> server closed the connection unexpectedly
>> This probably means the server terminated abnormally
>> before or while processing the request.
>> The connection to the server was lost. Attempting reset: Failed.
>> !>
>>
>> So I think that it doesn't know what to do with vstrings. They should probably never be returned (they're mostly deprecated), but if they are, they should be cast to text, I think.
>
> It's not doing that for me.

You're using 5.8.8. In 5.10.0 $^V was changed to be an object.

I'm working in that area. I'll look into it.

Tim.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David E. Wheeler 2009-12-21 22:34:17 Re: Segfault from PL/Perl Returning vstring
Previous Message Peter Eisentraut 2009-12-21 21:58:34 Re: Possible patch for better index name choosing