pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@commandprompt.com>
To: mike stanton <mstanton@acsa.cl>
Cc: pgsql-general@postgresql.org
Subject: Re: refcursor
Date: Mon, 1 Sep 2008 11:52:40 -0400
Message-ID: <20080901155240.GF3776@alvh.no-ip.org> (raw)
In-Reply-To: <001201c90c3f$697618b0$0d6ea8c0@mike>
References: <001201c90c3f$697618b0$0d6ea8c0@mike>

mike stanton escribió:
> 
> Hello all,
> I've got a problem I can't get round. I want to declare a refcursor variable in a  C program and call a function which returns a refcursor portal to the main C program.
> When I compile the C program, I get a refcursor doesn´t exist message.
> Has anyone got a  C program which uses a refcursor variable?

Make sure the C program opens a transaction before calling the function,
otherwise the cursor is automatically closed as soon as the function ends.

-- 
Alvaro Herrera	    Valdivia, Chile           Geotag: -39,815 -73,257
"Ah, spring... when a young penguin's fancy lightly turns to thoughts of ...
Beta testing!"                                  (Fedora 9 beta announcement)



view thread (6+ messages)  latest in thread

Message-ID: <20080901155240.GF3776@alvh.no-ip.org>
Permalink:  ../20080901155240.GF3776@alvh.no-ip.org/
Also on:    postgresql.org/message-id/20080901155240.GF3776@alvh.no-ip.org

 · 

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: alvherre@commandprompt.com, mstanton@acsa.cl
  Subject: Re: refcursor
  In-Reply-To: <20080901155240.GF3776@alvh.no-ip.org>
  References: <001201c90c3f$697618b0$0d6ea8c0@mike> <20080901155240.GF3776@alvh.no-ip.org>

* 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