Re: Read Cursor to C

Поиск
Список
Период
Сортировка
От Christoph Haller
Тема Re: Read Cursor to C
Дата
Msg-id 200304291357.PAA02511@rodos
обсуждение исходный текст
Ответ на Read Cursor to C  (Gabriel Beletti <gbeletti@yahoo.com.br>)
Список 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 



В списке pgsql-interfaces по дате отправления:

Предыдущее
От: Antonio Giráldez
Дата:
Сообщение:
Следующее
От: "Haron, Charles"
Дата:
Сообщение: User-defined functions with Kylix/Delphi