Re: pattern search - Mailing list pgsql-general

From Scott Marlowe
Subject Re: pattern search
Date
Msg-id Pine.LNX.4.33.0205231201450.7477-100000@css120.ihs.com
Whole thread Raw
In response to pattern search  (ktt <kestutis98@yahoo.com>)
List pgsql-general
Yes, you can.

What you do is something like this:

$nugget = "smith";
$res = pg_exec($conn,"select * from table where lower(field) like
'%$nugget%'");
print implode(":",pg_fetch_array($res,0,PGSQL_ASSOC));

For large datasets, there are some issues with performance that can be
addressed by indexing or using the included full text index system
included in the postgresql-7.x.x/contrib/fulltextindex directory.

It's far better to do the search in postgresql than to suck all the data
into php and try to sort through it.

On Thu, 23 May 2002, ktt wrote:

> hello,
>
> is it possible to make a search
> for a pattern in PostgreSQL database,
> using database functions only?
> Or should I use PHP for that
> purpose?



pgsql-general by date:

Previous
From: Darren Ferguson
Date:
Subject: Re: pattern search
Next
From: Jeff Eckermann
Date:
Subject: Re: pattern search