08 Feb 2020   sql


When performing full-text search in Postgres you can add :* to the end of a string to be searched:

select title from posts where title::tsvector @@ 'instr:*'::tsquery;

This will match any post that has a word in its title that starts with instr