Hi depesz,

I've looked for things like that, but it doesn't seem like they've been
exposed in the Ruby API. If I try to make a DBI prepared statement, it
will just slurp-read the first time I call execute on it. The native
PostgreSQL-extension doesn't seem to have any classes for cursors or
prepared statements, and neither does the pure Ruby version.

Does anyone know if ActiveRecord might be a solution? Does it have it's
own implementation of a PostgreSQL connector?

Helge Elvik

-----Original Message-----
From: hubert depesz lubaczewski [mailto:depesz / depesz.com] 
Sent: 4. august 2006 11:31
To: ruby-talk ML
Subject: Re: [postgres] Is there a way to avoid having the library
slurp-read the whole result-set?

On 2006-08-04, Helge Elvik <helge.elvik / gispartner.no> wrote:
> Am I missing something, or is the really now way of receiving the
> results serially without the libraries slurping everything up in RAM
> first? The table I'm having trouble with currently has about 2 million

use cursor's. (in posrtgresql docs look for:
declare
fetch
move
close

depesz

-- 
http://www.depesz.com/index.php/2006/07/28/sprzedaje-samochod/