Re: [patch] A \pivot command for psql

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [patch] A \pivot command for psql
Дата
Msg-id 19660.1439141871@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [patch] A \pivot command for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Ответы Re: [patch] A \pivot command for psql  (Joe Conway <mail@joeconway.com>)
Re: [patch] A \pivot command for psql  ("Daniel Verite" <daniel@manitou-mail.org>)
Список pgsql-hackers
"Daniel Verite" <daniel@manitou-mail.org> writes:
> I want to suggest a client-side \pivot command in psql, implemented
> in the attached patch.

> \pivot takes the current query in the buffer, execute it and
> display it pivoted by interpreting the result as:

> column1 => row in pivoted output
> column2 => column in pivoted output
> column3 => value at (row,column) in pivoted ouput

I can see the value of a feature like this, but doing it in psql sure
seems like the wrong place.  It would be unavailable to anything
except interactive use.

Is there a way to implement pivoting as a set-returning function?
        regards, tom lane



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

Предыдущее
От: "Daniel Verite"
Дата:
Сообщение: [patch] A \pivot command for psql
Следующее
От: Josh Berkus
Дата:
Сообщение: Re: WIP: SCRAM authentication