I wrote a patch to add cursor support to PL/pgSQL. I sent it to pgsql-patches earlier, and Bruce said he would consider it after the 7.1 release. I would be interested in getting feedback on it, so for now I have put the patch up on the web: http://www.airs.com/ian/pgsql-cursor.html If you are interested in using cursors in PL/pgSQL, please take a look at the patch. Thanks. Ian