Re: [patch] A \pivot command for psql

Поиск
Список
Период
Сортировка
От Daniel Verite
Тема Re: [patch] A \pivot command for psql
Дата
Msg-id a86225c1-fe22-444b-8402-d5fd806d557c@mm
обсуждение исходный текст
Ответ на Re: [patch] A \pivot command for psql  (David Fetter <david@fetter.org>)
Ответы Re: [patch] A \pivot command for psql
Список pgsql-hackers
    David Fetter wrote:

> That depends on what you mean by "dynamic columns."  The approach
> taken in the tablefunc extension is to use functions which return
> SETOF RECORD, which in turn need to be cast at runtime.

For me, "PIVOT with dynamic columns" would be a pivot query
whose output columns are not enumerated as input in the
SQL query itself, in any form.

> The second, more on point, is to specify a serialization for the rows
> in the "dynamic columns" case.  Their syntax is "PIVOT XML", but I
> would rather do something more like "PIVOT (SERIALIZATION XML)".

The SERIALIZATION  looks interesting, but I believe these days JSON
would make more sense than XML, both as easier for the client-side and
because of all the json_* functions we now have to mix json with
relational structures.

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



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

Предыдущее
От: David Fetter
Дата:
Сообщение: Re: [patch] A \pivot command for psql
Следующее
От: Fabien COELHO
Дата:
Сообщение: Re: checkpointer continuous flushing