Hi all
The thought just occurred to me that a PIVOT feature might be a
respectable GSoC project.
tablefunc/crosstab works, but it's very clumsy to use, and difficult to
consume the data from. Going by Stack Overflow activity, pivot/crosstab
is second only to upsert when it comes to things that users find hard to
do in Pg.
I haven't investigated what'd be involved in implementing any integrated
form of pivoting, and I'm aware that there are some serious challenges
when it comes to generating a TupleDesc for pivot output. I thought I'd
raise it in case anyone has looked into this and has any comments on
whether this'd be a viable GSoC for an interested student.
-- Craig Ringer http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services