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

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
Дата
Msg-id CAA4eK1+Hzr4mnZO3aBPAPrkCn4=wAWf6smSdQezqsGXcz_KQ=Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Ответы Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Список pgsql-hackers
On Fri, Nov 16, 2018 at 9:43 AM Haribabu Kommi <kommi.haribabu@gmail.com> wrote:
>
> On Thu, Nov 15, 2018 at 5:18 PM Amit Kapila <amit.kapila16@gmail.com> wrote:
>>
>> > +--
>> > +-- remove query ('SELECT $1 + $2 AS "TWO"') executed by
>> > regress_stats_user2 in the current_database
>> > +--
>> > +SELECT pg_stat_statements_reset((SELECT r.oid FROM pg_roles AS r
>> > WHERE r.rolname = 'regress_stats_user2'),
>> > + (SELECT d.oid from pg_database As d where datname = current_database()),
>> > + (SELECT s.queryid FROM pg_stat_statements AS s WHERE s.query =
>> > 'SELECT $1 AS "ONE"'));
>> >
>> > The query in comments is different than what is actually used?  And
>> > how is able to remove the correct statement from hash (it seems you
>> > intended to remove 'SELECT $1 AS "ONE"', but it removed 'SELECT $1 +
>> > $2 AS "TWO"')?
>> >
>>
>> One more point, the length of each line is too long in this statement,
>> try to reduce it by starting parameters for pg_stat_statements_reset
>> from next line or something like that.
>
>
> Sorry for the mistake.
> Attached patch synced the comment and SQL statement.

Okay, but you haven't answered my question:
"how is able to remove the correct statement from hash (it seems
statement intended to remove 'SELECT $1 AS "ONE"', but it removed
'SELECT $1 + $2 AS "TWO"')"?

-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jean-Christophe Arnu
Дата:
Сообщение: Re: wal_dump output on CREATE DATABASE
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: wal_dump output on CREATE DATABASE