Re: [patch] Proposal for \crosstabview in psql

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: [patch] Proposal for \crosstabview in psql
Дата
Msg-id 37a68a8b-62cc-49df-8130-2716f9ea4bbc@mm
обсуждение исходный текст
Ответ на Re: [patch] Proposal for \crosstabview in psql  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Ответы Re: [patch] Proposal for \crosstabview in psql  (Robert Haas <robertmhaas@gmail.com>)
Re: [patch] Proposal for \crosstabview in psql  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
    Alvaro Herrera wrote:

> I wonder if the business of appending values of multiple columns
> separated with spaces is doing us any good.  Why not require that
> there's a single column in the cell?  If the user wants to put things
> together, they can use format() or just || the fields together.  What
> benefit is there to the ' '?  When I ran my first test queries over
> pg_class I was surprised about this behavior:
> alvherre=# select * from pg_class
> alvherre=# \crosstabview relnatts relkind

ISTM that this could be avoided by erroring out for lack of an
explicit 3rd column as argument. IOW, we wouldn't assume
that "no column specified" means "show all columns".

About simply ripping out the possibility of having multiple
columns into cells, it's more radical but if that part turns out to
be more confusing than useful, I don't have a problem
with removing it.

The other case of stringing multiple contents into the same cell
is when different tuples carry (row,column) duplicates.
I'm not inclined to disallow that case, I think it would go too far
in guessing what the user expects.
My expectation for a viewer is that it displays the results as far as
possible, whatever they are.
Also, showing such contents in vertically-growing cells as it
does now allows the user to spot these easily in the grid when
they happen to be outliers. I'm seeing it as useful in that case.

Best regards,
--
Daniel Vérité
PostgreSQL-powered mailer: http://www.manitou-mail.org
Twitter: @DanielVerite



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

Предыдущее
От: Christian Ullrich
Дата:
Сообщение: Re: VS 2015 support in src/tools/msvc
Следующее
От: Magnus Hagander
Дата:
Сообщение: Re: BUG #13854: SSPI authentication failure: wrong realm name used