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