pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Vecernik <vecernik@aon.at>
To: pgsql-general@postgresql.org
Subject: refcursor
Date: Sun, 05 Jan 2003 11:11:57 +0100
Message-ID: <3E1804ED.50203@aon.at> (raw)

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 doing wrong (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





view thread (6+ messages)  latest in thread

Message-ID: <3E1804ED.50203@aon.at>
Permalink:  ../3E1804ED.50203@aon.at/
Also on:    postgresql.org/message-id/3E1804ED.50203@aon.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: vecernik@aon.at
  Subject: Re: refcursor
  In-Reply-To: <3E1804ED.50203@aon.at>
  References: <3E1804ED.50203@aon.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox