On Sun, Sep 06, 2020 at 01:06:05PM -0700, Peter Geoghegan wrote:
> On Tue, Sep 1, 2020 at 2:08 PM Alvaro Herrera <alvherre@2ndquadrant.com> wrote:
> > It does need some separator. Maybe a comma is sufficient, but I'm not
> > sure: that will fail when we add cross-relation stats, because the
> > FROM clause will have more relations and possibly have commas too.
>
> How about a line break? That seems like a simple solution that takes
> all the competing concerns into account.
>
> The fact that that will stand out isn't necessarily a bad thing. I
> think it's a good thing.
Like this ?
postgres=# \d t
Table "public.t"
Column | Type | Collation | Nullable | Default
--------+---------+-----------+----------+---------
a | integer | | |
b | integer | | |
Statistics objects:
"public"."t" (ndistinct, dependencies, mcv) ON a, b FROM t
Are there any other examples of similarly related information spread across
lines ?
I find that to be too verbose ; I guess it could be shown only in \d+, which is
true of column stats.
It's weird that the quoting rules are different for the stats object vs the
columns and the table. The schema qualification is also divergent. Also,
"public.t" form is technically wrong (the objects should be *separately*
quoted), but seems to be used all over. If the table or schema has a dot, it's
ambiguous what this means: Table "public.public.t".
--
Justin