Re: PL/Perl Does not Like vstrings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PL/Perl Does not Like vstrings
Date
Msg-id 504.1325785288@sss.pgh.pa.us
Whole thread Raw
In response to Re: PL/Perl Does not Like vstrings  ("David E. Wheeler" <david@justatheory.com>)
Responses Re: PL/Perl Does not Like vstrings  ("David E. Wheeler" <david@justatheory.com>)
Re: PL/Perl Does not Like vstrings  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
"David E. Wheeler" <david@justatheory.com> writes:
> On Jan 5, 2012, at 7:34 AM, Tom Lane wrote:
>> Unconditional sv_mortalcopy sounds like the thing to do then, but a
>> comment would help.  And if this isn't a Perl bug, I would like to
>> know what is.

> Question: Is this an issue anywhere else in PL/Perl, or just elog()?

I would imagine you could reproduce it by returning the same kinds of
objects as function results, since the actual problem is in utf8 to
database-encoding conversion.

> No segfault, at least, though that�s a rather bizarre error message. AFAIK, $^V isn�t a hash. This works, though:
>     spi_query_prepared($plan, v1);

Is that actually a vstring?  I confess I'd never heard of the things
before this thread, but I remember reading somewhere that you need
multiple dots in a string before it's considered a vstring and not
something else.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "David E. Wheeler"
Date:
Subject: Re: PL/Perl Does not Like vstrings
Next
From: Andrew Dunstan
Date:
Subject: Re: PL/Perl Does not Like vstrings