Re: Returning recordsets with functions

From: Kevin Barnard <kevin(dot)barnard(at)gmail(dot)com>
To: Robert Fitzpatrick <robert(at)webtent(dot)com>
Cc: PostgreSQL <pgsql-general(at)postgresql(dot)org>
Subject: Re: Returning recordsets with functions
Date: 2004-09-23 16:02:01
Message-ID: b068057c040923090240f4902e@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Use the return type of SETOF and user the RETURN NEXT for each record.
If you are already returning a record that's half the battle.

http://www.postgresql.org/docs/7.4/static/plpgsql-control-structures.html#PLPGSQL-STATEMENTS-RETURNING

On Thu, 23 Sep 2004 11:26:15 -0400, Robert Fitzpatrick
<robert(at)webtent(dot)com> wrote:
> Can someone point me to some more information or perhaps show an example
> of returning a recordset from a plpgsql function. I'd like to send an
> argument or arguments to the function, do some queries to return a set
> of records. I've done several functions that return one value of one
> type, but nothing that returns a set.
>
> --
> Robert
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo(at)postgresql(dot)org
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2004-09-23 16:22:53 Re: Réf. : Re: v8 on AIX5.2
Previous Message frederic.germaneau 2004-09-23 15:59:38 Réf. : Re: v8 on AIX5.2