postgres代码块

do language plpgsql $$
declare    
    i int;
begin
    for i in 1..4 loop
    sql := format('crete table%....',i);--%占位符
    execute sql;
    raise notice '%',sql;--打印
    end loop;
end;
$$;
原文地址:https://www.cnblogs.com/liuboyuan/p/14451370.html