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; $$;
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; $$;