Re: External search engine, advice
| От | Tom Lane |
|---|---|
| Тема | Re: External search engine, advice |
| Дата | |
| Msg-id | 7117.990318022@sss.pgh.pa.us обсуждение |
| Ответ на | Re: External search engine, advice (mlw <markw@mohawksoft.com>) |
| Список | pgsql-hackers |
mlw <markw@mohawksoft.com> writes:
> If I do:
> create temp table fubar as select ftss_results() as songid;
> select * from cdsongs where songid = fubar.songid;
> That works, but that is slow and a lot of people have emotional difficulties
> with using temporary tables.
If you don't like temp tables, try
select cdsongs.* from cdsongs, (select ftss_results() as ftss) as tmp
where songid = tmp.ftss;
which'll produce the same results.
Do I need to point out that the semantics aren't the same as with IN?
(Unless the output of ftss_results is guaranteed unique...)
> Also, an 'IN' clause does not
> preserve the order of the results, where as a join should.
This statement is flat-out wrong --- don't you know that SQL makes no
promises about tuple ordering?
regards, tom lane
В списке pgsql-hackers по дате отправления: