From: | Alex Hunsaker <badalex(at)gmail(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | pgsql-committers(at)postgresql(dot)org, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: pgsql: Fix breakage from earlier plperl fix. |
Date: | 2012-01-06 03:59:33 |
Message-ID: | CAFaPBrT3AOzrKHZJ=2P5aD+kEXEKEgaBHwLJB_uqqnXBHKProw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers pgsql-hackers |
On Thu, Jan 5, 2012 at 16:59, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 01/05/2012 06:31 PM, Alex Hunsaker wrote:
>>
>> On Thu, Jan 5, 2012 at 16:02, Andrew Dunstan<andrew(at)dunslane(dot)net> wrote:
>>>
>>> Fix breakage from earlier plperl fix.
>> I can't help but think this seems a bit inefficient
>
> So, yes, we should probably adjust this one more time, but ideally we need a
> better test than just SvREADONLY(). If you want to follow up your
> investigation of exactly when we need a copied SV and see how much you can
> narrow it down that would be great.
After further digging I found it chokes on any non scalar (IOW any
reference). I attached a simple c program that I tested with 5.8.9,
5.10.1, 5.12.4 and 5.14.2 (for those who did not know about it,
perlbrew made testing across all those perls relatively painless).
PFA that copies if its readonly and its not a scalar. Also I fixed up
Tom's complaint about having sv2cstr() inside do_util_elog's PG_TRY
block. I didn't bother fixing the ones in plperl.c tho-- some seemed
like they would require quite a bit of rejiggering.
I didn't bother adding regression tests-- should I have?
Attachment | Content-Type | Size |
---|---|---|
svutf8_fix3.patch | text/x-patch | 2.2 KB |
svutf8_ro_test.c | text/x-csrc | 927 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-01-06 07:26:07 | Re: pgsql: Fix breakage from earlier plperl fix. |
Previous Message | Andrew Dunstan | 2012-01-05 23:59:53 | Re: pgsql: Fix breakage from earlier plperl fix. |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-01-06 07:26:07 | Re: pgsql: Fix breakage from earlier plperl fix. |
Previous Message | Stephen Frost | 2012-01-06 01:10:17 | Re: 16-bit page checksums for 9.2 |