CREATE OR REPLACE FUNCTION copyData() RETURNS boolean AS $BODY$ DECLARE i int; begin i :=1; FOR i IN 1..9 LOOP copy tb4_20130109012 to '/mnt/ramfs/weibo.tb4001w'; copy tb4_20130109012 from '/mnt/ramfs/weibo.tb4001w'; RAISE NOTICE 'i IS %', i; END LOO