zoocasa/activerecord-postgresql-cursors — pull request #1 by nightscape (2012-05-22 18:03:57+00:00)
Title: Efficient implementation of each_slice

Dear Zoocasa team,

I refactored the code a little and added an efficient implementation of Enumerable#each_slice(rows_per_slice) which calls `FETCH FORWARD #{rows_per_slice} FROM #{cursor_name}` (see http://www.postgresql.org/docs/9.1/static/sql-fetch.html) to fetch several rows at once.
I also copied the existing tests and made sure they run with each_slice as well.

It would be cool, if you could release a version with this patch included :)

Best regards
Martin