I\'m looking for a way to emulate something like SELECT * FROM table WHERE attr LIKE \'%text%\' using a tsvector in PostgreSQL.
I\'ve created a tsvector
SELECT title
FROM table
WHERE title_tsv @@ to_tsquery('zend') and
title_tsv @@ to_tsquery('fram:*')
is equivalent to:
SELECT title
FROM table
WHERE title_tsv @@ to_tsquery('zend & fram:*')
but of course that finds "Zend has no framework" as well.
You could of course express a regular expression match against title after the tsquery match, but you would have to use explain analyze to make sure that was being executed after the tsquery instead of before.