in reply to Faster of two options for finding keywords in a database

psql=# drop operator if exists =~ (text, text); psql=# drop function if exists pcre_match (text, text); psql=# create function pcre_match (text, text) returns bool language plperl immutable leakproof strict parallel safe as $$ return $_[0] =~ $_[1] ? 1 : 0; $$; psql=# create operator =~ (function = pcre_match, leftarg = text, righ +targ = text); my @items = getfromdb ("select id, text from table where text =~ '$kwr +e'");

Enjoy, Have FUN! H.Merijn