On Sun, Feb 17, 2019 at 02:52:07PM -0700, legrand legrand wrote:
> Hello,
>
> It seems that pgss doesn't track commit (nor rollback) commands from
> pl/pgsql blocks.
> using psql in version 11.1:
>
> select pg_stat_statements_reset();
> do $$ begin commit; end $$;
> select calls,query from pg_stat_statements;
Uh, can you show me exactly what you were hoping to see? I see:
CREATE EXTENSION pg_stat_statements;
SELECT pg_stat_statements_reset();
pg_stat_statements_reset
--------------------------
DO $$ BEGIN COMMIT; END $$;
SELECT calls,query FROM pg_stat_statements;
calls | query
-------+-----------------------------------
1 | select pg_stat_statements_reset()
1 | do $$ begin commit; end $$
You wanted to see the 'commit'? That is not a client-supplied command
and is not tracked, and I am not sure we would want to do that.
--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +