Hello,
While reading [1] I notice $subject operators lacks of explanation in
documentation.[..]
~<~ less than
~>~ greater than
~<=~ less than or equal to
~>=~ greater than or equal to
For all, it is a character-by-character comparison regardless of collation. We
encounter them when we use text_pattern_ops for example :
create index ON users ( location text_pattern_ops);
explain select * from users where location like 'test%';
QUERY PLAN
------------------------------------------------------------ ------------------------
Index Scan using users_location_idx1 on users (cost=0.43..2.46 rows=54 width=201)
Index Cond: ((location ~>=~ 'test'::text) AND (location ~<~ 'tesu'::text))
Filter: (location ~~ 'test%'::text)
(3 lignes)
Should we add them on this page?
https://www.postgresql.org/docs/devel/static/functions- string.html
Thanks!
1: https://www.postgresql.org/docs/current/static/spgist- builtin-opclasses.html