Re: Three types of functions, ala function redux.
От | Stephan Szabo |
---|---|
Тема | Re: Three types of functions, ala function redux. |
Дата | |
Msg-id | Pine.BSF.4.21.0012191056140.77089-100000@megazone23.bigpanda.com обсуждение исходный текст |
Ответ на | Three types of functions, ala function redux. (mlw <markw@mohawksoft.com>) |
Список | pgsql-hackers |
[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.
В списке pgsql-hackers по дате отправления: