Empty values of pg_stats_ext when table is empty

From: PG Doc comments form <noreply(at)postgresql(dot)org>
To: pgsql-docs(at)lists(dot)postgresql(dot)org
Cc: stefan(dot)keller(at)ost(dot)ch
Subject: Empty values of pg_stats_ext when table is empty
Date: 2021-11-01 13:23:01
Message-ID: 163577298184.680.6561061840343770915@wrigleys.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/14/view-pg-stats-ext.html
Description:

When table mytable is being inherited it may not contain any data but still
return row sets from the inheriting tables. Now doing CREATE STATISTICS on
mytable will work but won't have any values.

This is very difficult to realize from a user's perspective and can be
either considered a feature or a bug, i.e. being enhanced.

Given this is considered as a feature, I suggest to add a comment at the end
of this documentation
https://www.postgresql.org/docs/current/view-pg-stats-ext.html like this:

<<
Note then there are no values when the table is empty which happens when
there are tables which inherit from it.
<<

I could also think of a run-time warning?

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2021-11-01 16:04:16 Re: Be more clear what names can be used for tables with "CREATE TABLE"?
Previous Message Laurenz Albe 2021-11-01 04:39:43 Re: Be more clear what names can be used for tables with "CREATE TABLE"?