| From: | Alex Hunsaker <badalex(at)gmail(dot)com> | 
|---|---|
| To: | Andrew Dunstan <andrew(at)dunslane(dot)net> | 
| Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "David E(dot) Wheeler" <david(at)justatheory(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> | 
| Subject: | Re: PL/Perl Does not Like vstrings | 
| Date: | 2012-01-04 20:27:07 | 
| Message-ID: | CAFaPBrTk4ZxNd9ygu_bDgN-vD20bmFtefwTpBON-DkjdZyT-zQ@mail.gmail.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
On Wed, Jan 4, 2012 at 13:13, Andrew Dunstan <andrew(at)dunslane(dot)net> wrote:
>
>
> On 01/04/2012 12:56 PM, Tom Lane wrote:
>> I looked at that last night but it appeared that SvOK would be perfectly
>> happy.  (Didn't actually try it, though, I was just eyeballing the flags
>> in gdb.)
>
> I tested it and you're right, it doesn't help. I don't see what else we can
> do about it. There doesn't appear to be any test for an SV in the API.
I think about the best we can do is something along the lines of:
sv2cstr()
{
...
  if (Perl_vverify(sv))
   return utf_u2e(SvPV(sv));
...
}
I dont the the utf_u2e is strictly needed (other than that it strdups)
as I don't think versions can have utf8 chars, or at least that $^V
will not have utf8 chars (and even if it did it would only cause
problems if they had codepoints in >128  <255).
We would still have issues with typeglobs...
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Robert Haas | 2012-01-04 20:27:50 | Re: Page Checksums + Double Writes | 
| Previous Message | Noah Misch | 2012-01-04 20:24:27 | Avoid FK validations for no-rewrite ALTER TABLE ALTER TYPE |