Search Postgresql Archives

Function to return per-column counts?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux