pgsql: Fix broken collation-aware searches in SP-GiST text opclass.

2018-04-16 Thread Tom Lane
Fix broken collation-aware searches in SP-GiST text opclass. spg_text_leaf_consistent() supposed that it should compare only Min(querylen, entrylen) bytes of the two strings, and then deal with any excess bytes in one string or the other by assuming the longer string is greater if the prefixes are

pgsql: Fix broken collation-aware searches in SP-GiST text opclass.

2018-04-16 Thread Tom Lane
Fix broken collation-aware searches in SP-GiST text opclass. spg_text_leaf_consistent() supposed that it should compare only Min(querylen, entrylen) bytes of the two strings, and then deal with any excess bytes in one string or the other by assuming the longer string is greater if the prefixes are

pgsql: Fix broken collation-aware searches in SP-GiST text opclass.

2018-04-16 Thread Tom Lane
Fix broken collation-aware searches in SP-GiST text opclass. spg_text_leaf_consistent() supposed that it should compare only Min(querylen, entrylen) bytes of the two strings, and then deal with any excess bytes in one string or the other by assuming the longer string is greater if the prefixes are

pgsql: Fix broken collation-aware searches in SP-GiST text opclass.

2018-04-16 Thread Tom Lane
Fix broken collation-aware searches in SP-GiST text opclass. spg_text_leaf_consistent() supposed that it should compare only Min(querylen, entrylen) bytes of the two strings, and then deal with any excess bytes in one string or the other by assuming the longer string is greater if the prefixes are

pgsql: Fix broken collation-aware searches in SP-GiST text opclass.

2018-04-16 Thread Tom Lane
Fix broken collation-aware searches in SP-GiST text opclass. spg_text_leaf_consistent() supposed that it should compare only Min(querylen, entrylen) bytes of the two strings, and then deal with any excess bytes in one string or the other by assuming the longer string is greater if the prefixes are

pgsql: Fix broken collation-aware searches in SP-GiST text opclass.

2018-04-16 Thread Tom Lane
Fix broken collation-aware searches in SP-GiST text opclass. spg_text_leaf_consistent() supposed that it should compare only Min(querylen, entrylen) bytes of the two strings, and then deal with any excess bytes in one string or the other by assuming the longer string is greater if the prefixes are