postgresql/contrib/pgstattuple/sql/pgstattuple.sql
Heikki Linnakangas 357cbaaeae Add pgstatginindex() function to get the size of the GIN pending list.
Fujii Masao, reviewed by Kyotaro Horiguchi.
2012-12-05 09:58:03 +02:00

22 lines
535 B
SQL

CREATE EXTENSION pgstattuple;
--
-- It's difficult to come up with platform-independent test cases for
-- the pgstattuple functions, but the results for empty tables and
-- indexes should be that.
--
create table test (a int primary key, b int[]);
select * from pgstattuple('test'::text);
select * from pgstattuple('test'::regclass);
select * from pgstatindex('test_pkey');
select pg_relpages('test');
select pg_relpages('test_pkey');
create index test_ginidx on test using gin (b);
select * from pgstatginindex('test_ginidx');