迭代生长表

时间:2019-01-14 12:17:17

标签: postgresql

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;

0 个答案:

没有答案