PL/pgsql return resultset/cursor?

From: Richard Emberson <emberson(at)phc(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: PL/pgsql return resultset/cursor?
Date: 2002-03-23 01:14:07
Message-ID: 3C9BD6DF.E5EF582E@phc.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Is it possible to return a result-set or cursor from a PL/pgsql
procedure, like

CREATE OR REPLACE FUNCTION foo()
RETURNS <WHAT_TYPE> AS '
BEGIN
RETURN SELECT * from FOO;
END;
' LANGUAGE 'plpgsql';

If you open a cursor in a procedure, it gets closed when the procedure
exits, right?

Richard

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jeff Lu 2002-03-23 01:39:42 What is the difference between --enable-multibyte and --enable-unicode-conversion?
Previous Message Martijn van Oosterhout 2002-03-23 00:27:05 Re: Postmaster processes running out of control?