Re: display of variables in EXPLAIN VERBOSE

From: Amit Langote <Langote_Amit_f8(at)lab(dot)ntt(dot)co(dot)jp>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, David Rowley <david(dot)rowley(at)2ndquadrant(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: display of variables in EXPLAIN VERBOSE
Date: 2019-04-23 04:54:51
Message-ID: 44030ba1-8b67-7548-efdd-e0888b198764@lab.ntt.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019/04/23 0:58, Tom Lane wrote:
> BTW, now that I look at this, I think the reason why I didn't make
> tlist printouts pay attention to VERBOSE for this purpose is that
> you don't get them at all if not verbose:
>
> regression=# explain select * from tt;
> QUERY PLAN
> ------------------------------------------------------
> Seq Scan on tt (cost=0.00..32.60 rows=2260 width=8)
> (1 row)
>
> So if we were to be rigidly consistent with this point of the docs,
> there would be no way to see a tlist without variable qualification,
> which doesn't really seem that nice.

Hmm yes. Variables in sort keys, quals, etc., which are shown without
VERBOSE, are qualified only if VERBOSE is specified. Variables in the
targetlists that are shown only in the VERBOSE output may be displayed
without qualifications, which looks a bit inconsistent.

explain (verbose, costs off) select * from foo where a > 0 order by 1;
QUERY PLAN
──────────────────────────────
Sort
Output: a
Sort Key: foo.a
-> Seq Scan on public.foo
Output: a
Filter: (foo.a > 0)
(6 rows)

Maybe, targetlist variables should *always* be qualified given that they
are considered VERBOSE information to begin with?

Thanks,
Amit

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-04-23 04:56:09 Re: REINDEX INDEX results in a crash for an index of pg_class since 9.6
Previous Message Kyotaro HORIGUCHI 2019-04-23 04:41:04 Re: Regression test PANICs with master-standby setup on same machine