Range types do not display in pg_stats - Mailing list pgsql-hackers

From Josh Berkus
Subject Range types do not display in pg_stats
Date
Msg-id 523B6481.5020403@agliodbs.com
Whole thread Raw
Responses Re: Range types do not display in pg_stats
List pgsql-hackers
create table tstztest( trange tstzrange );

postgres=# insert into tstztest select tstzrange(t, t + interval '1 month')
from generate_series('2012-01-01'::timestamptz,'2018-01-01','1 month')
as gs(t);
INSERT 0 73
postgres=# analyze tstztest;
ANALYZE
postgres=# select * from pg_stats where tablename = 'tstztest';schemaname | tablename | attname | inherited | null_frac
|avg_width |
 
n_distinct | most_common_vals | most_common_freqs | histogram_bounds
| correlation | most_common_elems | most_common_elem_freqs |
elem_count_histogram

------------+-----------+---------+-----------+-----------+-----------+------------+------------------+-------------------+------------------
+-------------+-------------------+------------------------+----------------------public     | tstztest  | trange  | f
      |         0 |        22 |       -1 |                  |                   |
 
|             |                   |                        |

Now, there actually *is* a histogram for the column, which you can find
via pg_statistic.  But is shows up as NULL in pg_stats view.

If this is a known issue, we ought to at least add it to the docs.

-- 
Josh Berkus
PostgreSQL Experts Inc.
http://pgexperts.com



pgsql-hackers by date:

Previous
From: Vik Fearing
Date:
Subject: Dump/Reload broken with relocatable extensions
Next
From: Dimitri Fontaine
Date:
Subject: Re: Where to load modules from?