CREATE OR REPLACE FUNCTION creatData()
  RETURNS boolean AS
$BODY$
DECLARE
i int;
begin    
i :=1;
FOR i IN 1..100000 LOOP
insert into t_wxdch_zyd(zydid,sj,zydbh,bzr,kssj,jssj,zyfs,jchzsj , qsbz , jdid , zydzt , bzz ,scbz,  dqg, bcid ,jd)
values(nextval('t_wxdch_zydid_seq'),'2012-11-05','1001','测试','2012-11-05','2012-11-05','解体','','1','','2','上峰尾','0','1','8012456','4396');

        RAISE NOTICE 'i IS %', i;
END LOOP;
if i > 0 then
     return false;
   else
     return true;
   end if;
end;   
$BODY$
  LANGUAGE 'plpgsql' VOLATILE
  COST 100;



//在查询分析器内执行。

 select * from creatData() as tab;