libpq

Поиск
Список
Период
Сортировка
От Chris
Тема libpq
Дата
Msg-id 38A2AE00.9EB1BE9B@bitmead.com
обсуждение исходный текст
Ответы Re: [HACKERS] libpq
Список pgsql-hackers
I've been poking around in the libpq area and I'm thinking of tackling
the streaming interface which was suggested recently.

What I have in mind is that a new API PQexecStream() doesn't retrieve
the results. The tuples are then read back one by one with
PQnextObject(). You can also use PQnextObject with regular PQexec, but
in that case you lose the most of the benefit of streaming because it
would allocate memory for all the result. So the proposal is...


/* like PQexec, but streams the results */
PGresult *PQexecStream(PGconn *conn, const char *query)
/* retrieve the next object from a PGresult */
PGobject *PQnextObject(PGconn *conn)
/* get value from an object/tuple */
char *PQgetObjectValue(const PGobject *res, int field_num)
/* free tuple when done */
void PQclearObject(PGobject *obj)

Oh yeah, can I fix the COPY protocol while I'm at it to conform more to
the other types of messages?

BTW, what is this PQ thing? Does it stand for postquel? Are we ever
going to dump that?

-- 
Chris Bitmead
mailto:chris@bitmead.com


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

Предыдущее
От: Hannu Krosing
Дата:
Сообщение: Re: [HACKERS] minor bug...
Следующее
От: Zeugswetter Andreas SB
Дата:
Сообщение: AW: AW: [HACKERS] Another nasty cache problem