madlib/madlib — pull request #167 by haradh1 (2012-06-07 21:30:20+00:00)
Title: SVEC: Another fix for text order in gp_sfv.

Jira: MADLIB-457
The previous fix was not correct in that replacing strcmp with strcol was
still not enough to match behaviors with the text sort operation in the
database backend. There is a little hack to deal with undefined orders in
non-C collation, in which case the backend uses strcmp as the last resort.

I rewrote the existing implementation to be efficient with use of bttextcmp.
This contains a little more of cosmetic changes than addressing issue, as
well as the fix for test failure in use of the ordered aggregate in PG8.4
and GPDB4.0.