Re: plpgsql/cursor - Mailing list pgsql-general

From
Subject Re: plpgsql/cursor
Date
Msg-id 200109150059.21e6@lh00.opsion.fr
Whole thread Raw
In response to plpgsql/cursor  ("augie" <augie@bravurasystems.com>)
List pgsql-general
> 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






pgsql-general by date:

Previous
From: Culley Harrelson
Date:
Subject: Re: Fwd: Re: unicode in 7.1
Next
From: Alex Pilosov
Date:
Subject: CLUSTER (was Re: get certain # of recs)