pg_stats 2014-02-02 code postgresqlsql SELECT attname, n_distinct, most_common_vals, most_common_freqs FROM pg_stats WHERE tablename = 'my_books';