Re: Wrong Results from SP-GiST with Collations

Peter Geoghegan <pg@bowt.ie>

From: Peter Geoghegan <pg@bowt.ie>
To: emre@hasegeli.com, Teodor Sigaev <teodor@sigaev.ru>
Cc: PostgreSQL Bugs <pgsql-bugs@postgresql.org>
Date: 2018-04-10T16:38:12Z
Lists: pgsql-bugs
On Tue, Apr 10, 2018 at 9:21 AM, Emre Hasegeli <emre@hasegeli.com> wrote:
> I assume we don't have any option than removing support for comparison
> operators with collations just like btree.

I can't imagine how this could ever work, since a non C-collation
string cannot be atomized into tokens like that. Considering each
token successively during a comparison does not always produce the
same answer as a straight comparison against the original string
would.

I believe that there are cases that won't work with *any* glibc or ICU
collation, not just "cs_CZ".

-- 
Peter Geoghegan


Commits

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

  2. Add prefix operator for TEXT type.