using text search - Mailing list pgsql-general

From Rafał Pietrak
Subject using text search
Date
Msg-id 517537E5.30503@zorro.isa-geek.com
Whole thread Raw
Responses Re: using text search
List 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 by date:

Previous
From: Manning John
Date:
Subject: Regression test fails v9.2.4
Next
From: Merlin Moncure
Date:
Subject: Re: Where in the source code does postgres write to disk?