Created
January 23, 2018 16:49
-
-
Save mhkeller/0caa25c35102767bcd21c21cf235babb to your computer and use it in GitHub Desktop.
Convert each row in a postgresql table to a text search vector to search across all fields in a table
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select * | |
from table_name | |
where to_tsvector(table_name::text) @@ to_tsquery('full-text-query'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment