Re: display of variables in EXPLAIN VERBOSE

Поиск
Список
Период
Сортировка
От David Rowley
Тема Re: display of variables in EXPLAIN VERBOSE
Дата
Msg-id CAKJS1f-LMkZ1WietC4ewaM8s8iJ5maCfwd1BxDX6aK5FkEfYKA@mail.gmail.com
обсуждение исходный текст
Ответ на display of variables in EXPLAIN VERBOSE  (Amit Langote <Langote_Amit_f8@lab.ntt.co.jp>)
Ответы Re: display of variables in EXPLAIN VERBOSE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, 22 Apr 2019 at 19:49, Amit Langote
<Langote_Amit_f8@lab.ntt.co.jp> wrote:
> Seeing that "Sort Key" is always displayed with the range table alias, I
> checked explain.c to see why the discrepancy exists and it seems that
> show_plan_tlist() (and show_tablesample()) use the following condition for
> whether or not to use the range table prefix:
>
>     useprefix = list_length(es->rtable) > 1;
>
> whereas other functions, including show_sort_group_keys() that prints the
> "Sort Key", use the following condition:
>
>     useprefix = (list_length(es->rtable) > 1 || es->verbose);
>
> I can think of two ways we could do:
>
> 1. Change show_plan_tlist() and show_tablesample() to use the same rule as
> others
>
> 2. Change other functions to use the same rule as show_plan_tlist(), also
> updating the documentation to note the exceptional case when column names
> are not prefixed

I'd vote to make the code match the documentation, but probably
implement it by adding a new field to ExplainState and just calculate
what to do once in ExplainQuery() instead of calculating what to do in
various random places.

I don't think we should backpatch this change, likely it would be
better to keep the explain output as stable as possible in the back
branches, so that might mean a documentation tweak should be done for
them.

-- 
 David Rowley                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Unhappy about API changes in the no-fsm-for-small-rels patch
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Do CustomScan as not projection capable node