Re: pg_stat_statements doesn't track commit from pl/pgsql blocks
| От | Bruce Momjian |
|---|---|
| Тема | Re: pg_stat_statements doesn't track commit from pl/pgsql blocks |
| Дата | |
| Msg-id | 20190222020052.4wjwtt3qdyp4rh6f@momjian.us обсуждение исходный текст |
| Ответ на | pg_stat_statements doesn't track commit from pl/pgsql blocks (legrand legrand <legrand_legrand@hotmail.com>) |
| Список | pgsql-general |
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 +
В списке pgsql-general по дате отправления: