Segfault from PL/Perl Returning vstring - Mailing list pgsql-hackers

From David E. Wheeler
Subject Segfault from PL/Perl Returning vstring
Date
Msg-id 3710576A-52D4-464A-AF12-93E570B35E55@kineticode.com
Whole thread Raw
Responses Re: Segfault from PL/Perl Returning vstring
List pgsql-hackers
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 unexpectedlyThis probably means the server terminated abnormallybefore or while processing
therequest. 
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. 

Best,

David

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Streaming replication and non-blocking I/O
Next
From: Andrew Dunstan
Date:
Subject: Re: Segfault from PL/Perl Returning vstring