|From:||"Daniel Verite" <daniel(at)manitou-mail(dot)org>|
|To:||"David Fetter" <david(at)fetter(dot)org>|
|Subject:||Re: [patch] A \pivot command for psql|
|Views:||Raw Message | Whole Thread | Download mbox | Resend email|
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
PostgreSQL-powered mailer: http://www.manitou-mail.org
|Next Message||Fabien COELHO||2015-08-11 15:15:22||Re: checkpointer continuous flushing|
|Previous Message||David Fetter||2015-08-11 14:41:43||Re: [patch] A \pivot command for psql|