Re: v13: show extended stats target in \d

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: Peter Geoghegan <pg(at)bowt(dot)ie>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, Georgios Kokolatos <gkokolatos(at)pm(dot)me>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Tomas Vondra <tomas(dot)vondra(at)2ndquadrant(dot)com>, Tatsuro Yamada <tatsuro(dot)yamada(dot)tf(at)nttcom(dot)co(dot)jp>
Subject: Re: v13: show extended stats target in \d
Date: 2020-09-06 20:48:23
Message-ID: 20200906204823.GC6744@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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(at)2ndquadrant(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Zidenberg, Tsahi 2020-09-06 21:00:02 Re: [PATCH] audo-detect and use -moutline-atomics compilation flag for aarch64
Previous Message Peter Geoghegan 2020-09-06 20:06:05 Re: v13: show extended stats target in \d