Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query
Date
Msg-id 4cf51ccb-7a38-db4b-efe6-6c481a0576d3@2ndquadrant.com
Whole thread Raw
In response to Re: New function pg_stat_statements_reset_query() to reset statisticsof a specific query  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: New function pg_stat_statements_reset_query() to resetstatistics of a specific query  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
On 14/12/2018 19:44, Robert Haas wrote:
> I'm showing up very late to the party here, but I like option 1 best.
> I feel like the SQL standard has a pretty clear idea that NULL is how
> you represent a value is unknown, which shows up in a lot of places.
> Deciding that we're going to use a different sentinel value in this
> one case because NULL is a confusing concept in general seems pretty
> strange to me.

[The difference between #1 and #4 is whether "any" is represented as
NULL or 0.]

An example:

select pg_stat_statements_reset(
10,
(select min(oid) from pg_database where datname like 'test%'),
1234);

(This is obviously a weird example, but it illustrates the
language-theoretic point.)

If you have no matching databases, under #1 this would then apply to all
databases.  Under #4 it would not.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: removal of dangling temp tables
Next
From: Tomas Vondra
Date:
Subject: Re: explain plans with information about (modified) gucs