Answer the question
In order to leave comments, you need to log in
Postgresql how to search a string for a substring from an array of keywords?
I have a filters table with a keywords field of text[] type.
There is an incoming string string. I need to select all lines from filters in which at least one word from the keywords column occurs in string.
Something like this
SELECT * FROM filters WHERE strpos(ANY (keywords), string) >0
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question