----Original Message From: Moritz Bayer
>But still the question:
>Is it possible to put a loop into a loop? Or doesn't it make sense at all?
I'm not sure what the OP was about, but Yes, it it possible to put a loop into a loop. See:
http://www.postgresql.org/docs/8.2/static/plpgsql-control-structures.html
particularly the references to [ <<label>> ] and EXIT [ label ] and CONTINUE [ label ] for nested loops.
Regards,
George