We can list tables' s custom options why checking pg_class' s reloptions columns. For example; like this post.
select relname, reloptions
from pg_class
where relname = 'a_table';
Yet, I couldn' t find anything in official documents and on the internet to list custom statistic settings for columns after altering them like this:
ALTER TABLE name ALTER [ COLUMN ] column_name SET STATISTICS integer;
How can we list those settings?
The statistics target is not a property of the table, but a property of the column. Therefore, you will find it in the metadata table of columns, which is pg_attribute
. The column in question is attstattarget
. Other per-column settings can be found in attoptions
.