Re: v13: show extended stats target in \d
Peter Geoghegan <pg@bowt.ie>
From: Peter Geoghegan <pg@bowt.ie>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>,
Georgios Kokolatos <gkokolatos@pm.me>, PostgreSQL Hackers <pgsql-hackers@postgresql.org>,
Tomas Vondra <tomas.vondra@2ndquadrant.com>, Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Date: 2020-09-07T21:31:07Z
Lists: pgsql-hackers
On Sun, Sep 6, 2020 at 1:48 PM Justin Pryzby <pryzby@telsasoft.com> wrote:
> On Sun, Sep 06, 2020 at 01:06:05PM -0700, Peter Geoghegan wrote:
> > How about a line break? That seems like a simple solution that takes
> > all the competing concerns into account.
> Like this ?
> Statistics objects:
> "public"."t" (ndistinct, dependencies, mcv) ON a, b FROM t
No, not like that.
ISTM that the problem with your original proposal is that it suggests
that it ought to be possible to add "STATISTICS 0" to the end of a
CREATE STATISTICS statement. That's not accurate, though. In reality
the only way to set the statistics target for a statistics object is
with ALTER STATISTICS. We should attempt to convey that difference
here.
More concretely, I was suggesting including a second line that's
similar to the following example output (iff the statistics target has
actually been set):
Statistics objects:
"public"."t" (ndistinct, dependencies, mcv) ON a, b FROM t
(STATISTICS 0)
Maybe some variation would be better -- the precise details are not
important. The new line conveys the fact that STATISTICS 0 is a part
of the object, but cannot appear in CREATE STATISTICS itself. That
seems like the right way of framing this.
--
Peter Geoghegan
Commits
-
psql: Display stats target of extended statistics
- aeb781107a7c 13.0 landed
- 3c99230b4f0d 14.0 landed
-
Allow setting statistics target for extended statistics
- d06215d03b50 13.0 cited