Segfault from PL/Perl Returning vstring

From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Segfault from PL/Perl Returning vstring
Date: 2009-12-21 19:26:38
Message-ID: 3710576A-52D4-464A-AF12-93E570B35E55@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 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.

Best,

David

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-12-21 19:46:17 Re: Segfault from PL/Perl Returning vstring
Previous Message Tom Lane 2009-12-21 18:21:28 Re: Streaming replication and non-blocking I/O