The following yields (seemingly exactly) 0.1
:
select ts_rank_cd(to_tsvector('cat'), to_tsquery('cat'));
Yet the following yields t
:
select ts_rank_cd(to_tsvector('cat'), to_tsquery('cat')) > 0.1;
I would expect it to yield t
if the operation was >=
, not >
How can I get the "real" value of the ts_rank_cd
so that it returns f
?
As background, I'm writing a full text search query that uses keyset pagination with ts_rank
, so being able to order results based on a concrete, precise value of ts_rank
is important. With keyset pagination, the client provides the last result from the current page as a parameter and asks for the next page. Currently, when my client passes back 0.1
, the above >
behavior causes erroneous results