Re: Using In Clause For a Large Text Matching Query

From: Richard Broersma Jr <rabroersma(at)yahoo(dot)com>
To: Erik Jones <erik(at)myemma(dot)com>
Cc: General Postgresql List <pgsql-sql(at)postgresql(dot)org>
Subject: Re: Using In Clause For a Large Text Matching Query
Date: 2006-06-30 00:17:38
Message-ID: 20060630001738.11455.qmail@web31801.mail.mud.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

> Well, there is also: <a
> href="http://www.postgresql.org/docs/8.1/interactive/functions-comparisons.html#AEN13377">
>
> /expression/ /operator/ ANY (/array expression/)</a>. So, if you have a way to preprocess you
> input text fields that you want matched
> you could build a regex for each and feed them in an array to an '~ ANY' expression like so (or,
> use ~* for case
> insensitive matching):
>
> SELECT col1
> FROM table
> WHERE col1 ~ ANY (ARRAY['regex1', 'regex2', ...]);

Good point, But don't forget to include the list in your response. :-)

Regards,

Richard Broersma Jr.

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Phillip Smith 2006-06-30 00:37:24 Re: SELECT Aggregate
Previous Message Vinnie Ma 2006-06-29 21:42:14 SQL (Venn diagram type of logic)