We just had a complaint on IRC that:
devel=# select 'blah foo bar'::tsvector = 'blah foo bar'::tsvector;?column?
----------f
(1 row)
and that searches for certain values would not return all matches under
some circumstances.
a little bit of testing shows the following:
postgres=# create table foo (bla tsvector);
CREATE TABLE
postgres=# insert into foo values ('bla bla');
INSERT 0 1
postgres=# insert into foo values ('bla bla');
INSERT 0 1
postgres=# select bla from foo group by bla; bla
-------'bla'
(1 row)
postgres=# create index foo_idx on foo(bla);
CREATE INDEX
postgres=# set enable_seqscan to off;
SET
postgres=# select bla from foo group by bla; bla
-------'bla''bla'
(2 rows)
postgres=# set enable_seqscan to on;
SET
postgres=# select bla from foo group by bla; bla
-------'bla'
(1 row)
ouch :-(
I can reproduce that at least on OpenBSD/i386 and Debian Etch/x86_64.
It is also noteworthy that the existing regression tests for tsearch2 do
not seem to do any equality testing ...
Stefan