Re: Returning Composite Types from C functions

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: John Hansen <john(at)geeknet(dot)com(dot)au>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Returning Composite Types from C functions
Date: 2005-06-18 11:55:40
Message-ID: 20050618115540.GA91124@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Hansen 2005-06-18 12:03:38 Re: Returning Composite Types from C functions
Previous Message John Hansen 2005-06-18 11:18:34 Returning Composite Types from C functions