Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

Sergei Kornilov <sk@zsrv.org>

From: Sergei Kornilov <sk@zsrv.org>
To: Haribabu Kommi <kommi.haribabu@gmail.com>
Cc: Ashutosh Sharma <ashu.coek88@gmail.com>, Euler Taveira <euler@timbira.com.br>, Robert Haas <robertmhaas@gmail.com>, Pg Hackers <pgsql-hackers@postgresql.org>
Date: 2018-07-02T08:42:17Z
Lists: pgsql-hackers
Hello

I found SELECT pg_stat_statements_reset(NULL,NULL,s.queryid) in tests and it pass tests, but i wonder how it works. Should not we check the NULL through PG_ARGISNULL macro before any PG_GETARG_*? According src/include/fmgr.h 
> * If function is not marked "proisstrict" in pg_proc, it must check for
> * null arguments using this macro.  Do not try to GETARG a null argument!

> pg_stat_statements_reset(userid Oid, dbid Oid, queryid bigint) returns void
And you forgot to change return type in docs (and description of return value)

regards, Sergei


Commits

  1. Extend pg_stat_statements_reset to reset statistics specific to a

  2. Default monitoring roles