CREATE OR REPLACE FUNCTION ADD_TEST() returns text as $$ declare detail_count integer; begin detail_count=0; WHILE detail_count < 9553116 LOOP --insert 語句 detail_count = detail_count+1; end loop; RETURN ''; end; $$ LANGUAGE plpgsql;