> In pl/pgsql at any rate, functions which return a set of rows build up > the entire result set in memory and then return the set in one go: Ok, then pl/pgsql and pl/python (which can't return SETOF) are ruled out. (Thank you for pointing that out). But pl/perl seems to do the trick: "PL/Perl functions can also return sets of either scalar or composite types. Usually you'll want to return rows one at a time, both to speed up startup time and to keep from queueing up the entire result set in memory" Any other issues anyone can think about? -- Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-general