> can i declare and fetch from a cursor inside a
plpgsql function?  (pg version 7.0.3)

In 7.1, the pl/pgsql document says you can code like
this:

DECLARE
 rec record;
BEGIN
 for rec in SELECT * from MyTable LOOP
    update tableX set tableX=rec.fieldA;
 END LOOP;
END;

CN

--------------------------------------------------------
You too can have your own email address from Eurosport.
http://www.eurosport.com






---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to