> 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?

Well, assuming that ftss_results() returns a set of songid, you could
do something like:

select * from cdsongs where songid in (select ftss_results());

BTW, what's the difference between ftss_search and ftss_results?
--
Tatsuo Ishii

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Reply via email to