Re: Support LIKE with nondeterministic collations - Mailing list pgsql-hackers

From Daniel Verite
Subject Re: Support LIKE with nondeterministic collations
Date
Msg-id 9364e6e6-9cc2-4eb1-91b1-dc4c780af597@manitou-mail.org
Whole thread Raw
In response to Re: Support LIKE with nondeterministic collations  (Jeff Davis <pgsql@j-davis.com>)
List pgsql-hackers
    Jeff Davis wrote:

> >   col LIKE 'smith%' collate "nd"
> >
> > is equivalent to:
> >
> >   col >= 'smith' collate "nd" AND col < U&'smith\ffff' collate "nd"
>
> That logic seems to assume something about the collation. If you have a
> collation that orders strings by their sha256 hash, that would entirely
> break the connection between prefixes and ranges, and it wouldn't work.

Indeed I would not trust this trick to work outside of ICU collations.


Best regards,
--
Daniel Vérité
https://postgresql.verite.pro/
Twitter: @DanielVerite



pgsql-hackers by date:

Previous
From: Kirill Reshke
Date:
Subject: Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW
Next
From: Jeff Davis
Date:
Subject: Re: Inconsistency with EXPLAIN ANALYZE CREATE MATERIALIZED VIEW