Arbitrary table joins. - Mailing list pgsql-general

From Rod Taylor
Subject Arbitrary table joins.
Date
Msg-id 04a201c09a96$b6bf5be0$2205010a@jester
Whole thread Raw
List pgsql-general
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

pgsql-general by date:

Previous
From: "Mitch Vincent"
Date:
Subject: Fw: PHP and pg_connect()
Next
From: Peter Eisentraut
Date:
Subject: Re: Locking