create or replace function forcounter() returns int as 
$$
declare
   id int; ret int ;
begin
   FOR counter IN 1..1800000 LOOP
      id = 0;
   END LOOP;
   return ret;
end
$$ language plpgsql;

explain analyze select forcounter();

