is there a generic solution to dump the result of a query as a crosstab, when I can't know how many columns I will need?
E.g. I get something like this:
id, x1, a1, b1, c2, l2, m
and I'd like to see it as:
id, x1, x2, x3, ..... xn1, a, b, c, null, .... null2, l, m, ....
I fear the problem is I dont know n.