Re: Functions that return both Output Parameters and recordsets

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Jeremy Nix <Jeremy(dot)Nix(at)sfsltd(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: Functions that return both Output Parameters and recordsets
Date: 2007-06-11 13:34:25
Message-ID: 20070611133425.GA32957@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, Jun 11, 2007 at 03:20:15PM +0200, Pavel Stehule wrote:
> it's not possible. PostgreSQL doesn't support multiple recordset. You
> have to have two functions.

If you don't mind handling cursors then you could return multiple
cursors from one function. See the PL/pgSQL documentation for an
example (the example is at the bottom of the page).

http://www.postgresql.org/docs/8.2/interactive/plpgsql-cursors.html

--
Michael Fuhr

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Pavel Stehule 2007-06-11 13:36:06 Re: transaction problem using cursors
Previous Message Pavel Stehule 2007-06-11 13:32:15 Re: transaction problem using cursors