> 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 think the above needs a different sql statement to begin with.
The "= function()" clearly states that function is only allowed to return one row.
The following syntax currently works, and is imho sufficient:
select * from table where col in (select function());
Andreas