Re: [SQL] Joins involving functions

2006-04-11 Thread Markus Schaber
Hi, Jeff Boes, Jeff Boes wrote: > select * from bar > cross join f_foo(bar.b) as foo; > > Unfortunately, this last statement returns an error: > > NOTICE: adding missing FROM-clause entry for table "bar" > ERROR: function expression in FROM may not refer to other relations of > same query lev

[SQL] Joins involving functions

2006-04-10 Thread Jeff Boes
I have a function that returns a row from a table, e.g.: create table foo (a integer); create function f_foo (integer) returns foo language 'sql' as $foo$ select * from foo where a = $1 limit 1 $foo$ create table bar (b integer); select * from bar cross join f_foo(bar.b) as foo; Unfortunatel