Re: New SQL counter statistics view (pg_stat_sql)

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: New SQL counter statistics view (pg_stat_sql)
Дата
Msg-id 4a0bc542-b718-a40c-27ed-551c83263dde@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: New SQL counter statistics view (pg_stat_sql)  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: New SQL counter statistics view (pg_stat_sql)  (David Fetter <david@fetter.org>)
Re: New SQL counter statistics view (pg_stat_sql)  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: [PATCH] get_home_path: use HOME
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Typo in pgstat.h