Re: function returning a row

From: Joe Conway <mail(at)joeconway(dot)com>
To: Kjetil Haaland <kjetil(dot)haaland(at)student(dot)uib(dot)no>
Cc: Michael Fuhr <mike(at)fuhr(dot)org>, pgsql-novice(at)postgresql(dot)org
Subject: Re: function returning a row
Date: 2004-12-15 15:16:20
Message-ID: 41C05544.10602@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Kjetil Haaland wrote:
> this i have done, i can return a single value of my own type from the
> function. So now i am wondering, is it possible to return a set of my type?
> If it is possible, how do i do that?
>

I haven't followed this thread from the beginning, but if I understand
correctly, you have a custom scalar type, and you want to return a set
of that type? You should be able to declare the function with
"RETURNS setof alignres", and then implement it as an SRF. See for
example normal_rand() in contrib/tablefunc.

Joe

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Geoffrey 2004-12-15 15:17:10 Re: \d output to a file
Previous Message Gary Cowell 2004-12-15 15:12:17 Re: [PERFORM] \d output to a file