jon5pg@streamy.com wrote:
> Reading the post again I caught a typo in my query. I had been playing
> with variations of this test to try and get it working, but I have had no
> success with any combination as long as it returns this kind of type.
>
> I was comparing integers to uniqueidentiers, which actually works, but is
> unrelated to the issue.
Does it still do it if you just return a single uniqueidentifier?
1. RETURN newid()
2. SELECT INTO r newid(); RETURN r;
3. SELECT id INTO r ...query... LIMIT 1; RETURN r;
If all of these fail, then presumably it's allocating memory incorrectly but only shows up in a function's context.
-- Richard Huxton Archonet Ltd