Re: [patch] A \pivot command for psql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [patch] A \pivot command for psql
Дата
Msg-id 25856.1439165886@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [patch] A \pivot command for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: [patch] A \pivot command for psql
Re: [patch] A \pivot command for psql
Список pgsql-hackers
"Daniel Verite" <daniel@manitou-mail.org> writes:
> Tom Lane wrote:
>> Is there a way to implement pivoting as a set-returning function?

> Not with the same ease of use. We have crosstab functions
> in contrib/tablefunc already, but the killer problem with PIVOT
> is that truly dynamic columns are never reachable directly.

I'm not sure how pushing it out to psql makes that better.  There is
no way to do further processing on something that psql has printed,
so you've punted on solving that issue just as much if not more.

I agree that the crosstab solution leaves a lot to be desired
as far as ease of use goes, but I don't want to define fixing its
ease-of-use problem as being "it's easy for manual use in psql".
psql is a minority API, you know.

Besides which, psql is not all that great for looking at very wide tables,
so I'm not sure that this would be very useful for dynamic column sets
anyway.
        regards, tom lane



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Precedence of standard comparison operators
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: tap tests remove working directories