> in the help inside your last patch, you are using "crosstab". Cannto be > crosstab the name for this feature?
If it wasn't taken already by contrib/tablefunc, that would be a first choice. But now, when searching for crosstab+postgresql, pages of results come out concerning the crosstab() function.