"Konstantin S. Zhinko [tIT]" <k(dot)zhinko(at)grape(dot)ru> writes:
> SELECT b.*
> FROM get_obj_list a
> LEFT JOIN get_obj(a.id) b ON 1=1
> Error: relation "a" does not exists.
This is not a bug. You cannot make use of values from one <table
reference> inside the definition of another <table reference>.
So the reference "a.id" is taken to be to a real table named "a",
not to the "a" alias elsewhere in the query.
You could do something like
SELECT (get_obj(id)).* FROM get_obj_list();
instead.
regards, tom lane