Alternatively, is there something really simple like a flag we can pass
with the query that tells PostgreSQL not to cache the entire result
set?
I haven't read the whole thread, but dbmail would be a fantastic
example of an application that should use a CURSOR. Not only are they
more memory efficient, they're faster too!
http://www.postgresql.org/docs/7.4/static/sql-declare.html
http://www.postgresql.org/docs/7.4/static/sql-close.html
http://www.postgresql.org/docs/7.4/static/sql-fetch.html
-sc
--
Sean Chittenden