Re: Returning multiple rows from plpgsql function

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Mintoo Lall <tlqmail(at)yahoo(dot)com>
Cc: <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Returning multiple rows from plpgsql function
Date: 2003-02-17 20:18:20
Message-ID: 20030217121738.F9891-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql


On Mon, 17 Feb 2003, Mintoo Lall wrote:

> How can I return multiple rows from a plpqsql function. I wanted to
> write a function which gives me the result of the final select query
> from a bunch of nested select queries. What return type should use?
> The return type %ROWTYPE only returns a single row. In SQL function I
> can do this by stating that the function returns a setof record but it
> doesnt work in plpgsql function.

You might want to look at the Set Returning Functions document at
techdocs.postgresql.org.

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Yudie 2003-02-17 20:56:01 Format Function
Previous Message Mintoo Lall 2003-02-17 20:07:13 Returning multiple rows from plpgsql function