| From: | "David E(dot) Wheeler" <david(at)justatheory(dot)com> |
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: PL/Perl Does not Like vstrings |
| Date: | 2012-01-05 17:51:19 |
| Message-ID: | 6A6DE41F-234A-4D4A-A095-C0E4D454C915@justatheory.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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 more dotted 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 preferred to use the v syntax.
Best,
David
| From | Date | Subject | |
|---|---|---|---|
| Next Message | David E. Wheeler | 2012-01-05 17:53:40 | Re: PL/Perl Does not Like vstrings |
| Previous Message | Andrew Dunstan | 2012-01-05 17:50:14 | Re: PL/Perl Does not Like vstrings |