libpq - Mailing list pgsql-hackers

From Chris
Subject libpq
Date
Msg-id 38A2AE00.9EB1BE9B@bitmead.com
Whole thread Raw
Responses Re: [HACKERS] libpq
List 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 by date:

Previous
From: Hannu Krosing
Date:
Subject: Re: [HACKERS] minor bug...
Next
From: Zeugswetter Andreas SB
Date:
Subject: AW: AW: [HACKERS] Another nasty cache problem