Re: New SQL counter statistics view (pg_stat_sql) - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: New SQL counter statistics view (pg_stat_sql)
Date
Msg-id 4a0bc542-b718-a40c-27ed-551c83263dde@2ndquadrant.com
Whole thread Raw
In response to Re: New SQL counter statistics view (pg_stat_sql)  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: New SQL counter statistics view (pg_stat_sql)
Re: New SQL counter statistics view (pg_stat_sql)
List pgsql-hackers
On 9/14/16 4:01 PM, Robert Haas wrote:
> I think it is not a good idea to make the command names used here the
> plural forms of the command tags.  Instead of "inserts", "updates",
> "imports", etc. just use "INSERT", "UPDATE", "IMPORT".  That's simpler
> and less error prone - e.g. you won't end up with things like
> "refreshs", which is not a word.

How about having the tag not be a column name but a row entry.  So you'd
do something like

SELECT * FROM pg_stat_sql WHERE tag = 'ALTER VIEW';

That way, we don't have to keep updating (and re-debating) this when new
command types or subtypes are added.  And queries written for future
versions will not fail when run against old servers.

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



pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [PATCH] get_home_path: use HOME
Next
From: Peter Eisentraut
Date:
Subject: Re: Typo in pgstat.h