用navicat给postgresql写一个简单存储

CREATE OR REPLACE FUNCTION "public"."Abaaa_Proc"()
RETURNS "pg_catalog"."void" AS $BODY$
declare i bigint;
declare f bigint;
BEGIN
i :=50;
FOR i in 1..1000 LOOP
f :=31111111111+i;
INSERT INTO *
(id_information, id_task, title, content, information_type, cover_url, publish_start_date, publish_end_date, multi_type, id_eoa, visit_num, sub_status, publish_um_no, delete_flag, created_by, created_date, updated_by, updated_date, top_flag, plan_type, plan_receiver)
VALUES(f, '909fd1bde738468bbdcb886931bbe434', '仅用于测试', '111111', '0224', 'fsinformation/20191205/123-_-_-1575509689934.jpg', '2019-12-05 09:33:00.000', '2020-01-05 09:33:00.000', '3', NULL, 0, '0204', 'HULONG295', 'N', 'swsopr', '2019-12-05 09:34:50.043', 'swsopr', '2019-12-05 09:34:50.043', 'N', NULL, NULL);

INSERT INTO *
( id_information, property, group_type, branch, region, district_code, district_flag, delete_flag, created_by, created_date, updated_by, updated_date, release_system, system_type, businesstype, dept_nos)
VALUES( f, '0', 'all', 'all', 'blank', 'blank', 'N', 'N', 'swsopr', '2019-12-05 09:34:50.043', 'swsopr', '2019-12-05 09:34:50.043', 'swsfs', 'blank', NULL, 'blank');

i=i+1;
end loop;


END
$BODY$
LANGUAGE plpgsql VOLATILE
COST 100

posted @ 2019-12-05 10:34  牧阳人  阅读(768)  评论(0编辑  收藏  举报