[GENERAL] Function to return per-column counts?

Поиск
Список
Период
Сортировка
От Seamus Abshere
Тема [GENERAL] Function to return per-column counts?
Дата
Msg-id 1506609299.1312748.1121344704.08A3A454@webmail.messagingengine.com
обсуждение исходный текст
Ответы Re: [GENERAL] Function to return per-column counts?  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-general
hey,

Does anybody have a function lying around (preferably pl/pgsql) that
takes a table name and returns coverage counts?

e.g.

#> select * from column_counts('cats'::regclass);
column_name | all_count | present_count | null_count | coverage |
---------------------------------------
name | 300 | 100 | 200 | 0.66

Thanks!
Seamus

--
Seamus Abshere, SCEA
https://www.faraday.io
https://github.com/seamusabshere
https://linkedin.com/in/seamusabshere


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

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

Предыдущее
От: Pavel Stehule
Дата:
Сообщение: Re: [GENERAL] Catching errors inside a LOOP is causing performance issues
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: [GENERAL] Catching errors inside a LOOP is causing performance issues