postgreSQL中是否存在某种循环,允许在该循环中插入新记录的表上进行迭代?
FOR row IN (SELECT *
FROM foo
)
LOOP
/*
do some actions
*/
INSERT INTO foo (id) VALUES (boo) -- I want this new record to be processed in any next interation of this loop
END LOOP;