Re: External search engine, advice - Mailing list pgsql-hackers

From mlw
Subject Re: External search engine, advice
Date
Msg-id 3B068632.789A11D3@mohawksoft.com
Whole thread Raw
In response to External search engine, advice  (mlw <markw@mohawksoft.com>)
Responses Re: Re: External search engine, advice  (Tatsuo Ishii <t-ishii@sra.co.jp>)
Re: Re: External search engine, advice  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Tatsuo Ishii wrote:
> 
> > I have an external search engine system which plugs in to postgres. I use a few
> > C functions to interface the search daemon with the Postgres back-end.
> >
> > The best that I have been able to do is do a "select" for each result. I have a
> > live demo/test site:
> >
> > http://www.mohawksoft.com/search.php3, and the PHP source code is at
> > http://www.mohawksoft.com/ftss_example.txt.
> >
> > I would love to get the results with one select statement, but have, to date,
> > been unable to figure out how. Anyone with any ideas?
> 
> It's possible to return a set of results from C functions using the
> new function manager in 7.1 or later. Take a look at following email
> in the archive.

Well, I kind of have that already. I can return a set, but I can't use it in a
join.

freedb=# select ftss_search('all { pink floyd money }') ;ftss_search
-------------        120
(1 row)
freedb=# select * from cdsongs where songid = ftss_results() ;
ERROR:  Set-valued function called in context that cannot accept a set

How do you join against a set?


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [COMMITTERS] pgsql/ oc/src/sgml/runtime.sgml rc/backend/uti ...
Next
From: Tom Lane
Date:
Subject: Re: Plans for solving the VACUUM problem