Improve docs for n_distinct_inherited

David Rowley <dgrowleyml@gmail.com>

From: David Rowley <dgrowleyml@gmail.com>
To: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2025-05-07T23:14:48Z
Lists: pgsql-hackers

Attachments

In [1] there's a bug report about ALTER TABLE ... ALTER COLUMN SET
(n_distinct = N) not working for partitioned tables. Of course, you
need to use n_distinct_inherited for partitioned tables, but the docs
don't say that.

I went through a few iterations of the wording to make this clearer
and landed on the attached.

David

[1] https://postgr.es/m/18916-985c04e9b5bed12b@postgresql.org

Commits

  1. Doc: clarify n_distinct_inherited setting