Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT - Mailing list pgsql-hackers

From Giles Lean
Subject Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT
Date
Msg-id 20100526133414.5554.qmail@sapphire.netherstone.net
Whole thread Raw
In response to Re: libpq, PQexecPrepared, data size sent to FE vs. FETCH_COUNT  (Abhijit Menon-Sen <ams@toroid.org>)
List pgsql-hackers
Abhijit Menon-Sen <ams@toroid.org> wrote:

> Unless you explicitly declare and fetch from an SQL-level cursor, your
> many GBs of data are going to be transmitted to libpq, which will eat
> lots of memory. (The wire protocol does have something like cursors,
> but libpq does not use them, it retrieves the entire result set.)

Sounds like a project.  Anyone got any suggestions about
semantics and function names?  (Assuming that this can be done
without causing more problems on the backend; I'd rather one
frontend client get messed up than mess up the server if
someone makes a query like that.)

I'm not exactly volunteering to work on something like this
(my TODO list is a trifle long) but I'm working on a native Go
language interface for PostgreSQL presently (influced by but
not an exact clone of libpq) so it's perhaps something I could
do if I get free time in future.

Giles


pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: ExecutorCheckPerms() hook
Next
From: Tom Lane
Date:
Subject: Re: mapping object names to role IDs