Re: pgsql: Fix breakage from earlier plperl fix.
Alex Hunsaker <badalex@gmail.com>
From: Alex Hunsaker <badalex@gmail.com>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: pgsql-committers@postgresql.org, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2012-01-06T03:59:33Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix breakage from earlier plperl fix.
- bd0e74a9ce98 9.2.0 cited
Attachments
- svutf8_fix3.patch (text/x-patch) patch
- svutf8_ro_test.c (text/x-csrc)
On Thu, Jan 5, 2012 at 16:59, Andrew Dunstan <andrew@dunslane.net> wrote: > > > On 01/05/2012 06:31 PM, Alex Hunsaker wrote: >> >> On Thu, Jan 5, 2012 at 16:02, Andrew Dunstan<andrew@dunslane.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?