I did review of last patch. I had to do small changes to run the code due last Tom's changes in psql. Updated patch is attached.
The last changes in this patch are two:
1. Remove strange server side sorting
2. Cleaning/reducing interface
Other code is +/- without changes. There was lot of discussion in this thread, I would not to repeat it.
I'll comment the changes:
@1 using server side sorting was really generic, but strange. Now, the crosstabview works without it without any significant functionality degradation.
@2 interface is minimalist - but good enough - I am thinking so it is good start point. I was able to run my examples without problems. The previous API was more comfortable - "+","-" symbols allows to specify order quickly, but without a agreement we can live without this feature. Now, a order of data is controlled fully by SQL. crosstabview does data visualization only. I have not any objection to this last design. It is reduced to minimum, but still it works well.
* All regress tests passed
* A code is well and well commented
* No new warnings or compilation issues
* Documentation is clean
I have two minor notes, can be fixed simply, if we accept this last design:
1. can be nice if documentation will contains one example
2. some regress tests
From my perspective, it is ready for commiter. Daniel solved the most big issues.