On Tue, 18 Jan 2005 10:43:02 +0000, Peter Haworth <[EMAIL PROTECTED]> wrote: > On Mon, 17 Jan 2005 17:46:17 -0800, Chris Ochs wrote: > > It looks like $r->child_terminate does what I need. In the case of > > Postgresql it eats the memory when you execute the query, regardless > > of whether you actually fetch any results. > > That can be worked around, however. By using a cursor, you can specify > exactly how much data you want at a time:
DBD::Pg doesn't support cursors. From the DBD::PG manpage: "Although PostgreSQL has a cursor concept, it has not been used in the current implementation. Cursors in PostgreSQL can only be used inside a transaction block. Because only one transaction block at a time is allowed, this would have implied the restriction, not to use any nested SELECT statements. Hence the execute method fetches all data at once into data structures located in the frontend application. This has to be considered when selecting large amounts of data!"