"Ben-Nes Michael" <miki(at)canaan(dot)co(dot)il> writes:> WHILE EXISTS ( SELECT * FROM gaps )> ...> END WHILE;
The docs show a different syntax for plpgsql's WHILE loops:
WHILE expression LOOP statementsEND LOOP;
regards, tom lane