pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedecpg: using cursor returned from a stored function
5+ messages / 2 participants
[nested] [flat]
* ecpg: using cursor returned from a stored function
@ 2004-11-09 11:39 Gaetano Sferra <gaesferr@libero.it>
2004-11-09 16:35 ` Re: ecpg: using cursor returned from a stored function Peter Eisentraut <peter_e@gmx.net>
0 siblings, 1 reply; 5+ messages in thread
From: Gaetano Sferra @ 2004-11-09 11:39 UTC (permalink / raw)
To: pgsql-interfaces
Hello to all,
I he some stored functions that returns a refcursor and I need to use this
cursor In my ECPG programs.
I've serached for documentation but I don't found anything about it so: How I
can do it?
Looking in the include files of PG I don't found a cursor data type so I don't
have any ideas on how proceed.
Thank you,
Gaetano Sferra
____________________________________________________________
Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione.
Abbonati subito su http://www.libero.it
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ecpg: using cursor returned from a stored function
2004-11-09 11:39 ecpg: using cursor returned from a stored function Gaetano Sferra <gaesferr@libero.it>
@ 2004-11-09 16:35 ` Peter Eisentraut <peter_e@gmx.net>
0 siblings, 0 replies; 5+ messages in thread
From: Peter Eisentraut @ 2004-11-09 16:35 UTC (permalink / raw)
To: Gaetano Sferra <gaesferr@libero.it>; +Cc: pgsql-interfaces
Am Dienstag, 9. November 2004 12:39 schrieb Gaetano Sferra:
> I he some stored functions that returns a refcursor and I need to use this
> cursor In my ECPG programs.
Cursors in ECPG are managed differently, so I strongly suspect that your idea
won't work.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ecpg: using cursor returned from a stored function
@ 2004-11-10 08:20 Gaetano Sferra <gaesferr@libero.it>
0 siblings, 0 replies; 5+ messages in thread
From: Gaetano Sferra @ 2004-11-10 08:20 UTC (permalink / raw)
To: peter_e <peter_e@gmx.net>; +Cc: pgsql-interfaces
---------- Initial Header -----------
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ecpg: using cursor returned from a stored function
@ 2004-11-10 08:38 Gaetano Sferra <gaesferr@libero.it>
0 siblings, 0 replies; 5+ messages in thread
From: Gaetano Sferra @ 2004-11-10 08:38 UTC (permalink / raw)
To: peter_e <peter_e@pmx.net>; +Cc: pgsql-interfaces
---------- Initial Header -----------
From : "Peter Eisentraut" peter_e@gmx.net
To : "Gaetano Sferra" gaesferr@libero.it
Cc : "pgsql-interfaces" pgsql-interfaces@postgresql.org
Date : Tue, 9 Nov 2004 17:35:55 +0100
Subject : Re: [INTERFACES] ecpg: using cursor returned from a stored function
> Am Dienstag, 9. November 2004 12:39 schrieb Gaetano Sferra:
> > I he some stored functions that returns a refcursor and I need to use this
> > cursor In my ECPG programs.
>
> Cursors in ECPG are managed differently, so I strongly suspect that your idea
> won't work.
>
> --
> Peter Eisentraut
Well, so it is impossible to use cursors returned by a stored function in ECPG?
There are work arounds?
Please give me an exausthive reply if you can.
Thank you
Gaetano Sferra
____________________________________________________________
Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione.
Abbonati subito su http://www.libero.it
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: ECPG: using cursor returned from a stored function
@ 2004-11-10 08:49 Gaetano Sferra <gaesferr@libero.it>
0 siblings, 0 replies; 5+ messages in thread
From: Gaetano Sferra @ 2004-11-10 08:49 UTC (permalink / raw)
To: pgsql-interfaces
> Cursors in ECPG are managed differently, so I strongly suspect that your idea
> won't work.
I know how cursor work in ECPG to perform queries but I need to use a cursor
returned by a stored function, eg:
CREATE FUNCTION myfunction() RETURNS REFCURSOR AS'
BEGIN
DECLARE mycursor FOR SELECT * FROM mytable;
OPEN mycursor;
RETURN mycursor;
END;
'LANGUAGE 'plpgsql';
Now I need to retrieve the cursor returned by this function in an ECPG module to
use it in a C program.
How I can do it or it is impossible? If it is impossible cursors returned by a
stored funcion are only useful within a plpgsql context?
Please, I need an exaustive reply to proceed with my works.
Thank you,
Gaetano Sferra
____________________________________________________________
Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione.
Abbonati subito su http://www.libero.it
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2004-11-10 08:49 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-11-09 11:39 ecpg: using cursor returned from a stored function Gaetano Sferra <gaesferr@libero.it>
2004-11-09 16:35 ` Peter Eisentraut <peter_e@gmx.net>
2004-11-10 08:20 Re: ecpg: using cursor returned from a stored function Gaetano Sferra <gaesferr@libero.it>
2004-11-10 08:38 Re: ecpg: using cursor returned from a stored function Gaetano Sferra <gaesferr@libero.it>
2004-11-10 08:49 Re: ECPG: using cursor returned from a stored function Gaetano Sferra <gaesferr@libero.it>
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