From: | "David E(dot) Wheeler" <david(at)justatheory(dot)com> |
---|---|
To: | Andrew Dunstan <andrew(at)dunslane(dot)net> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: PL/Perl Does not Like vstrings |
Date: | 2012-01-04 23:15:01 |
Message-ID: | 8F0C5426-FC43-46E7-935A-BC0E50E268B2@justatheory.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Jan 4, 2012, at 2:48 PM, Andrew Dunstan wrote:
>> That's kinda grotty ... and leaky ...
>>
>
> Of course it is. It wasn't meant as a solution but as validation of your suspicions about the nature of the problem. (The leakiness could be solved, though.)
From #p5p on irc.perl.org:
[10:58pm]dg:interesting, so SvPV() handles string overloading, but SvPVutf8() doesn't, yet: "Like C<SvPV>, but converts sv to utf8 first if necessary."
[10:58pm]dg:oh, only for readonly objects
[10:58pm]dg:probably why no-one has noticed, as version is probably the only readonly thing with string overloading
[11:08pm]TonyC:it doesn't need string overloading
[11:09pm]TonyC:https://gist.github.com/1562734
[11:12pm]TonyC:theory: using sv_mortalcopy() instead of newSVsv() should prevent the leak in that workaround, assuming there's no FREETMPS between the call and use of the return value
Useful?
David
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2012-01-04 23:20:19 | Re: pg_restore direct to database is broken for --insert dumps |
Previous Message | Jim Nasby | 2012-01-04 22:58:08 | Re: Autonomous subtransactions |