Re: pattern search

Поиск
Список
Период
Сортировка
От Scott Marlowe
Тема Re: pattern search
Дата
Msg-id Pine.LNX.4.33.0205231201450.7477-100000@css120.ihs.com
обсуждение исходный текст
Ответ на pattern search  (ktt <kestutis98@yahoo.com>)
Список 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 по дате отправления: