Re: Returning Composite Types from C functions - Mailing list pgsql-hackers

From Michael Fuhr
Subject Re: Returning Composite Types from C functions
Date
Msg-id 20050618115540.GA91124@winnie.fuhr.org
Whole thread Raw
In response to Returning Composite Types from C functions  ("John Hansen" <john@geeknet.com.au>)
List pgsql-hackers
On Sat, Jun 18, 2005 at 09:18:34PM +1000, John Hansen wrote:
> 
> SELECT ('1:2:3:4:5'::text::my_type).*;
> 
> This results in the text_to_my_type(text) function being called no less
> than 5 times. Once for each element.
> 
> Is this the desired behaviour, or a bug?

It's a known behavior with functions that return composite types.
Apparently it's not easy to fix:

http://archives.postgresql.org/pgsql-hackers/2005-04/msg00971.php

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/


pgsql-hackers by date:

Previous
From: "John Hansen"
Date:
Subject: Returning Composite Types from C functions
Next
From: "John Hansen"
Date:
Subject: Re: Returning Composite Types from C functions