Re: Functions returning sets - Mailing list pgsql-hackers

From mlw
Subject Re: Functions returning sets
Date
Msg-id 3B071F23.E59AF9DF@mohawksoft.com
Whole thread Raw
In response to Functions returning sets  (mlw <markw@mohawksoft.com>)
Responses Re: Re: Functions returning sets  (Oleg Bartunov <oleg@sai.msu.su>)
List pgsql-hackers
Tom Lane wrote:
> 
> Don Baccus <dhogaza@pacifier.com> writes:
> > What's so hard about writing "IN" rather than "=" ???
> 
> Even more to the point, if we did adopt such a (crazy IMHO)
> interpretation of '=', what makes anyone think that it'd be
> any more efficient than IN?
> 
> AFAICT, mlw is hoping that redefining '=' would magically avoid the
> performance problems with IN, but my bet is it'd be just the same.
> 
> What we need to do is teach the system how to handle WHERE ... IN ...
> as a form of join.  Changing semantics of operators isn't necessary
> nor helpful.

I will defer, of course, to your interpretation of '=', but I still think it
(if implemented efficiently) could be cool. However, I hang my head in shame
that I didn't see this syntax:

select table.* from table, (select function() as field) as result where
table.field = result.field;

It seems to be pretty efficient, and satisfies the main criteria that I needed,
which was a full text search could be used on select with no external
programming language.

Currently my system can't be used without an external programming language, and
this is a huge, if awkward solution. Thanks all.


pgsql-hackers by date:

Previous
From: Don Baccus
Date:
Subject: Re: Functions returning sets
Next
From: Andrew McMillan
Date:
Subject: Re: Re: External search engine, advice