pgsql-bugs(at)postgresql(dot)org writes:> "for ... select ... loop" repeat first 9 rows
This is fixed in 7.2.1 --- at least, I don't see anything wrongwhen trying your example.
regards, tom lane