Re: v13: show extended stats target in \d
Justin Pryzby <pryzby@telsasoft.com>
From: Justin Pryzby <pryzby@telsasoft.com>
To: gkokolatos@pm.me
Cc: pgsql-hackers@postgresql.org, Tomas Vondra <tomas.vondra@2ndquadrant.com>, Tatsuro Yamada <tatsuro.yamada.tf@nttcom.co.jp>
Date: 2020-09-01T01:14:29Z
Lists: pgsql-hackers
On Mon, Aug 31, 2020 at 07:47:35AM +0000, gkokolatos@pm.me wrote:
> ‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
> On Monday, 31 August 2020 08:00, Justin Pryzby <pryzby@telsasoft.com> wrote:
>
> > The stats target can be set since commit d06215d03, but wasn't shown by psql.
> > ALTER STATISISTICS .. SET STATISTICS n.
> >
> > Normal (1-D) stats targets are shown in \d+ table.
> > Stats objects are shown in \d (no plus).
> > Arguably, this should be shown only in "verbose" mode (\d+).
>
> This seems rather useful. May I suggest you add it to the commitfest?
I added at
https://commitfest.postgresql.org/29/2712/
+ appendPQExpBuffer(&buf, " STATISTICS %s",
Maybe it should have a comma, like ", STATISTICS %s"?
Similar to these:
appendPQExpBuffer(&buf, ", ON TABLE %s",
|Triggers:
| trg1 AFTER INSERT ON trigpart3 FOR EACH ROW EXECUTE FUNCTION trigger_nothing(), ON TABLE trigpart
and:
appendPQExpBufferStr(&buf, ", PARTITIONED");
|part_ee_ff FOR VALUES IN ('ee', 'ff'), PARTITIONED,
Also, now I wonder if CREATE STATISTICS should support some syntax to set the
initial target. Like:
|CREATE STATISTICS abstats ON a,b FROM child.abc_202006 WITH(STATISTICS 111);
--
Justin
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