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

From: Sergei Kornilov <sk(at)zsrv(dot)org>
To: Haribabu Kommi <kommi(dot)haribabu(at)gmail(dot)com>
Cc: Ashutosh Sharma <ashu(dot)coek88(at)gmail(dot)com>, Euler Taveira <euler(at)timbira(dot)com(dot)br>, Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query
Date: 2018-07-02 08:42:17
Message-ID: 11886611530520937@web27g.yandex.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2018-07-02 08:42:21 Re: Should contrib modules install .h files?
Previous Message Peter Eisentraut 2018-07-02 08:39:57 Re: branches_of_interest.txt