Re: No result when selecting attstattarget from pg_attribute

Tom Lane <[email protected]> Thu, 28 Nov 2019 09:54:14 -0500
Newsgroups gmane.comp.db.postgresql.admin
Message-ID <[email protected]>
"William Sescu (Suva)" <[email protected]> writes:
> I was following the create statistics example from the doc
> https://www.postgresql.org/docs/11/sql-createstatistics.html
> and wondered why I don't see any results when selecting attstattarget from pg_attribute.

attstattarget has nothing to do with extended statistics.
It's for recording "ALTER TABLE ... SET STATISTICS n"
commands, which just control the granularity of the
regular (pg_statistic) statistics.

Look into pg_statistic_ext to see the effects of CREATE
STATISTICS.

			regards, tom lane