I have a schema like the following (just an example):
CREATE TABLE example (
id int primary key
, text1 text
, text2 text
, text3 text
, text4 text
, text5 text
, text6 text
);
Question:
I'm trying to run a pattern matching search on the 6 text columns using the ~*
operator. Can I query the example table by the count of appearances of my pattern in the 6 columns?
Example:
I want to find all rows that have said keyword in at least 3 of the 6 text columns. Whichever of those 6 columns does not matter.