Re: PL/Perl Does not Like vstrings

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: PL/Perl Does not Like vstrings
Дата
Msg-id CAFaPBrTk4ZxNd9ygu_bDgN-vD20bmFtefwTpBON-DkjdZyT-zQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: PL/Perl Does not Like vstrings  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
On Wed, Jan 4, 2012 at 13:13, Andrew Dunstan <andrew@dunslane.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...


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Noah Misch
Дата:
Сообщение: Avoid FK validations for no-rewrite ALTER TABLE ALTER TYPE
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Page Checksums + Double Writes