2 * If you want the statistics of per-relation or per-column, please modify
3 * nspname, relname, and attname in 'WHERE' clause.
6 BEGIN TRANSACTION ISOLATION LEVEL SERIALIZABLE;
8 * If you want to chage the output file name, please modify the following name.
12 COPY (SELECT n2.nspname,
20 COALESCE(a.attname, ''),
21 n1.nspname AS schemaname_of_atttype,
48 FROM dbms_stats.column_stats_effective co
50 ON (co.starelid = a.attrelid AND co.staattnum = a.attnum)
54 ON t.typnamespace = n1.oid
55 RIGHT JOIN dbms_stats.relation_stats_effective r
56 ON co.starelid = r.relid
57 JOIN pg_catalog.pg_class cl
59 JOIN pg_catalog.pg_namespace n2
60 ON cl.relnamespace = n2.oid
61 -- WHERE n2.nspname = 'public'
62 -- AND cl.relname = 'test'
63 -- AND a.attname = 'id'
64 ORDER BY starelid, staattnum)