Hi!

create table foo (
	id int4 primary key,
	....
);

create function bar
returns setof int4
langauge 'C'
as '...'
immutable strict
;


So query:
select foo.* from foo, bar() as b where foo.id=b;

Function foo() always returns ordered values and after first call it knows exact 
  number of results. It seems to me this information may be helpful for query 
optimizer, so, is there way to say it to optimizer?


-- 
Teodor Sigaev                                  E-mail: teodor@sigaev.ru

Tue, 28 Sep 2004 14:59:47 +0400
Teodor Sigaev <teodor@sigaev.ru>
Optimizer and function returning setof int4