returning a cursor from a function? - Mailing list pgsql-general

From Matthew Hixson
Subject returning a cursor from a function?
Date
Msg-id B7F00468-94C7-4906-A3E9-E83EA3898795@poindextrose.org
Whole thread Raw
Responses Re: returning a cursor from a function?  (Michael Fuhr <mike@fuhr.org>)
List pgsql-general
I have a create function statement that works with Oracle 8i and I'm
trying to create this function in Postgres 8.1.2.

CREATE OR REPLACE FUNCTION pr_user( p0 CHAR ) RETURN
Types.cursor_type IS
rs Types.cursor_type;
BEGIN
OPEN rs FOR
SELECT us.approval_type_code AS us_approval_type_code FROM wbs_users
us WHERE upper( us.username ) = upper( p0 );
return rs;
END;

Could someone lend me a hand here?
   Thanks in advance,
    -M@

pgsql-general by date:

Previous
From: "James Harper"
Date:
Subject: Re: libpq questions
Next
From: Michael Fuhr
Date:
Subject: Re: returning a cursor from a function?