Thread: Arbitrary table joins.

Arbitrary table joins.

From
"Rod Taylor"
Date:
The below is what I'd like:
select * from table natural join (select tablename from table where
table_id  = 'rid');

select tablename from table where table_id = 'rid';   returns 'table2'

So, the equivalent of what I'd like in this case is:  select * from
table natural join table2;

I could do this with a plpgsql function using EXECUTE but returning
the full result set will be troublesome for a while.

Till then, 2 queries...

--
Rod Taylor

There are always four sides to every story: your side, their side, the
truth, and what really happened.

Attachment