"Ehab Galal" <ehabgalal123@hotmail.com> writes:
> SELECT t1.*
> FROM (t1 outer join t2 on (t1.a=t2.a and t1.b=t2.b)) t outer join t3 on
> (t1.c=t3.c);
> ERROR: invalid reference to FROM-clause entry for table "t1"
> HINT: There is an entry for table "t1", but it cannot be referenced from
> this part of the query.
Drop the alias on the outer join (the "t"). Per SQL spec, that masks
table names (and aliases) within the join from the rest of the query.
regards, tom lane