crosstab - pivot - transpose - Mailing list pgsql-general

From SunWuKung
Subject crosstab - pivot - transpose
Date
Msg-id 1168535947.884116.50410@i39g2000hsf.googlegroups.com
Whole thread Raw
List pgsql-general
Hi,
I will need to create a crosstab representation of my resultset.
The resultset looks like this: rowid, columnid, cellvalue
I don't know beforehand the number of columns and their id's but they
will be close to 200.

I have looked at the crosstab tablefunction but it seems that you have
to know your data in advance to use that. I looked at the posts here
and many said that it can (only/easily) be done in a language like
plperl.

Does somebody have an example for this simple case?

Thanks for the help.
Balázs


pgsql-general by date:

Previous
From: Scott Ribe
Date:
Subject: Re: Cluster all tables in database to PK index
Next
From: "Patrick Earl"
Date:
Subject: Checkpoint request failed on version 8.2.1.