After fixing the problem with utility statements, this whole block: do $$ declare n integer:= 1; begin loop PERFORM a,b,c,d FROM t1, t2, t3, t4 WHERE t1.a = t2.b AND t3.c = t4.d ORDER BY a; exit when n = 1000; n := n + 1; end loop; end $$; Is only processed once, as those are nested statements, in order to match the 1000 statements the GUC pg_stat_monitor.track must be set to 'all' and then back to the default of 'top' when done testing it. |
||
---|---|---|
.. | ||
expected | ||
sql |