using text search

Поиск
Список
Период
Сортировка
От Rafał Pietrak
Тема using text search
Дата
Msg-id 517537E5.30503@zorro.isa-geek.com
обсуждение исходный текст
Ответы Re: using text search
Список pgsql-general
... or not (I'm not quite sure)

Hello,

I have the following tables:

CREATE TABLE orders (info text, ....);
CREATE TABLE keywords (phrase text, .....);

And I need to find all the ORDERS rows, which conain a PHRASE present in
the info column ... like so:
SELECT o.* from orders o join keywords k on (o.info ~~ '%' || k.phrase
|| '%');

... only this does not work, since:
ERROR:  argument of JOIN/ON must be type boolean, not type text

is this possible in SQL? Or may be this a job for "ts_something()"
(havent' learned to use them, yet)???

-R


В списке pgsql-general по дате отправления:

Предыдущее
От: Manning John
Дата:
Сообщение: Regression test fails v9.2.4
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Where in the source code does postgres write to disk?