pg.ddx.io pgsql-interfaces@postgresql.org mailing list archive
help / color / mirror / Atom feedRe: Read Cursor to C
2+ messages / 2 participants
[nested] [flat]
* Re: Read Cursor to C
@ 1970-01-01 00:00 Christoph Haller <ch@rodos.fzk.de>
parent: Gabriel Beletti <gbeletti@yahoo.com.br>
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Haller @ 1970-01-01 00:00 UTC (permalink / raw)
To: gbeletti@yahoo.com.br; +Cc: pgsql-interfaces
>
>
> Hi, my name is Gabriel and I need to read binary data
> from de DB and write it to a file in C. How do I use
> this cursor? Howm do I read the data from the cursor
> after the query is done and write it to C?
>
Use the libpq interface:
PQexec(.., "DECLARE <cursorname> BINARY CURSOR FOR <query>")
PQexec(.., "FETCH ALL IN <cursorname>")
PQgetvalue(.., .., ..)
PQexec(.., "CLOSE <cursorname>")
See the doc on libpq for details.
Regards, Christoph
^ permalink raw reply [nested|flat] 2+ messages in thread
* Read Cursor to C
@ 2003-04-28 18:05 Gabriel Beletti <gbeletti@yahoo.com.br>
0 siblings, 1 reply; 2+ messages in thread
From: Gabriel Beletti @ 2003-04-28 18:05 UTC (permalink / raw)
To: pgsql-interfaces
Hi, my name is Gabriel and I need to read binary data
from de DB and write it to a file in C. How do I use
this cursor? Howm do I read the data from the cursor
after the query is done and write it to C?
Thank you for the help,
/******************************************\
* Gabriel da Silva Beletti *
* ------------------------ *
* Ciências da Computação *
* Computing Science *
* *
* UNIVERSIDADE FEDERAL DE SANTA CATARINA *
* FEDERAL UNIVERSITY OF SANTA CATARINA *
* *
* Site..: http://www.inf.ufsc.br/~gbeletti *
* E-mail: gbeletti@inf.ufsc.br *
* UIN : 119620783 *
\******************************************/
_______________________________________________________________________
Yahoo! Mail
O melhor e-mail gratuito da internet: 6MB de espaço, antivírus, acesso POP3, filtro contra spam.
http://br.mail.yahoo.com/
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-04-28 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-04-28 18:05 Read Cursor to C Gabriel Beletti <gbeletti@yahoo.com.br>
1970-01-01 00:00 ` Christoph Haller <ch@rodos.fzk.de>
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