Read up on refcursors - exactly what I wanted, thank you Adrian! -- View this message in context: http://postgresql.nabble.com/Dynamic-execution-returning-large-result-sets-tp5929177p5929211.html Sent from the PostgreSQL - general mailing list archive at Nabble.com. -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general