On Tue, Apr 7, 2009 at 11:18 AM, Matthew Wakeling <matthew@xxxxxxxxxxx> wrote: > On Fri, 3 Apr 2009, Tom Lane wrote: >>> >>> ... alternatively is there a way to read two results streams >>> simultaneously? >> >> Use two cursors and FETCH from each as needed? In recent releases you >> can even scroll backwards, which you're going to need to do to make >> a merge join work. > > What would be the syntax for putting a single row from a cursor into a > variable? I have tried: > > FETCH INTO left left_cursor; according to the docs, Examples: FETCH curs1 INTO rowvar; FETCH curs2 INTO foo, bar, baz; FETCH LAST FROM curs3 INTO x, y; FETCH RELATIVE -2 FROM curs4 INTO x; http://www.postgresql.org/docs/8.3/interactive/plpgsql-cursors.html#PLPGSQL-CURSOR-USING merlin -- Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance