<enio@pmpf.rs.gov.br> writes:
> execute ''update '' || quote_ident(table) || '' set '' ||
> quote_ident(field) '' = '' || quote_literal(val1) ||
> '' where '' || quote_ident(field) || '' = '' ||
> quote_literal(val2);
> if found then
I don't believe EXECUTE sets FOUND. You'll need to do something else,
perhaps use FOR IN EXECUTE.
> I am using postgresql version 7.2.3
You'll probably also need to use a newer Postgres release; IIRC 7.2
didn't set FOUND properly in for-loops.
regards, tom lane