From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: External search engine, advice |
Date: | 2001-05-20 00:20:22 |
Message-ID: | 7117.990318022@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
mlw <markw(at)mohawksoft(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-05-20 00:23:33 | Re: Fix for tablename in targetlist |
Previous Message | Andrew McMillan | 2001-05-20 00:14:10 | Re: Re: External search engine, advice |