[I was having trouble with the direct address so i'm only sending to
the list]
> select * from table where col = function() ;
> (2) "function()" returns a number of values that are independent of the
> query. Postgres should be able to optimize this to be: "select * from
> table where col in (val1, val2, val3, ..valn)." I guess Postgres can
> loop until done, using the isDone flag?
I disagree here. I really don't think that changing = to mean "in"
in the system is a good idea. If the user wants an in they should
specify it.
I think "select * from table where col in (select function());" or
"select * from table where col in (select * from function());" or
even "select * from table where col in function();"
are better ways of specifying this sort of behavior.
If we do that (col = <function returning set>) meaning in, then does
col = (select statement that returns multiple rows) mean in and what
about col = <array>? I think doing it only for the function case is
a mistake.