Wildcard LIKE and Sub-select - Mailing list pgsql-sql

From Travis Whitton
Subject Wildcard LIKE and Sub-select
Date
Msg-id cf9b4f3e0611100723r617301cen7f56902e288f1011@mail.gmail.com
Whole thread Raw
Responses Re: Wildcard LIKE and Sub-select
List pgsql-sql
Hi everybody,<br />I have two tables of the following structure:<br /><br />Table "keywords"<br /><br />column   |
type<br/>---------------------<br />id           | integer<br />keyword | varchar(255)<br /><br />and<br /><br />Table
"badwords"<br /><br />column   | type<br />----------------------<br />badword  | varchar(255)<br /><br /><br />I need
todelete all the rows from the keywords table where badword partially matches the keyword field. I know I can do an
exactmatch with a sub-select, but I'm not sure how to structure a wildcard match / like clause with a sub-select. Also,
isthat the best way to do it, or should I be looking into full-text? I have roughly 10 million keywords and 1 million
badwords.<br /><br />Thanks,<br />Travis<br /><br /> 

pgsql-sql by date:

Previous
From: Tom Lane
Date:
Subject: Re: Constraint on multicolumn index
Next
From: "A. Kretschmer"
Date:
Subject: Re: Between and miliseconds (timestamps)