Re: PL/Perl Does not Like vstrings

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: PL/Perl Does not Like vstrings
Дата
Msg-id 6A6DE41F-234A-4D4A-A095-C0E4D454C915@justatheory.com
обсуждение исходный текст
Ответ на Re: PL/Perl Does not Like vstrings  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Jan 5, 2012, at 9:41 AM, Tom Lane wrote:

> I would imagine you could reproduce it by returning the same kinds of
> objects as function results, since the actual problem is in utf8 to
> database-encoding conversion.
>
>> No segfault, at least, though that‚s a rather bizarre error message. AFAIK, $^V isn‚t a hash. This works, though:
>>    spi_query_prepared($plan, v1);
>
> Is that actually a vstring?  I confess I'd never heard of the things
> before this thread, but I remember reading somewhere that you need
> multiple dots in a string before it's considered a vstring and not
> something else.

Yes, it is. You can declare v-strings either by prepending a "v" to one or more dot-separated integers, or just 3 or
moredotted integers. 
 http://austin.pm.org/presentations/march2000/raty/vstrings.html

I believe the latter syntax is deprecated, though; it turned out to be confusing and pretty roundly hated. It's
preferredto use the v syntax. 

Best,

David



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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: PL/Perl Does not Like vstrings
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: PL/Perl Does not Like vstrings