I found that such a statement would get 0 in PL/pgSQL.
PREPARE smt_del(int) AS DELETE FROM t1; EXECUTE 'EXECUTE smt_del(100)'; GET DIAGNOSTICS j = ROW_COUNT;
In fact, this is a problem with SPI, it does not support getting result of the EXECUTE command. I made a little enhancement. Support for the number of rows processed when executing INSERT/UPDATE/DELETE statements dynamically.