refcursor - Mailing list pgsql-general

From Oliver Vecernik
Subject refcursor
Date
Msg-id 3E1804ED.50203@aon.at
Whole thread Raw
Responses Re: refcursor  (Renê Salomão <rene@ibiz.com.br>)
List pgsql-general
Hi!

I'm playing with refcursor, but I'm not successful. I defined follwing
function:

CREATE OR REPLACE FUNCTION stat() RETURNS refcursor AS '
DECLARE
    ref refcursor;
BEGIN
    OPEN ref FOR
        SELECT * FROM tagebuch;
    RETURN ref;
END;
' LANGUAGE 'plpgsql';

Trying to see some results gives me:

sport=# select stat();
ERROR:  fmgr_info: function 16556: cache lookup failed
sport=# select version();
                            version
---------------------------------------------------------------
 PostgreSQL 7.2.1 on i686-pc-linux-gnu, compiled by GCC 2.95.4
(1 row)
sport=# select * from tagebuch;
...

This works fine. I receive the same error when I try to call stat() from Python with pyPgSQL-DBI adaptor. What am I
doingwrong (PostgreSQL runs on a Debian/Woody box)? 

Regards,
Oliver

--
VECERNIK Datenerfassungssysteme
A-2560 Hernstein, Hofkogelgasse 17
Tel.: +43 2633 47530, Fax: DW 50
http://members.aon.at/vecernik



pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Which 4GL application development tools are available?
Next
From: Lincoln Yeoh
Date:
Subject: Re: select for update with left outer joins?