Okay, if I'm understanding pg_stats at all, which I may not be, n_distinct
should represent # of distinct values in that row, no?
But, I have one field that has 5 distinct values:
iwantu=# select distinct(profiles_faith) from iwantu_profiles;
profiles_faith
----------------
0
1
2
7
8
(5 rows)
But pg_stats is reporting 1:
tablename | attname | avg_width | n_distinct
-----------------+------------------------+-----------+------------
iwantu_profiles | profiles_faith | 2 | 1
So am I reading n_distinct wrong?