On Tue, 18 Mar 2003 [EMAIL PROTECTED] wrote: > create temp table ab as > select a.value as a_value, b.value as b_value > from a left outer join b > on a.id = b.id; > > for row in select * from ab loop > return next row; > end loop; > > drop table ab;
If you're going to be doing create/drop table, you need to use EXECUTE on the queries relating to the table, otherwise it'll cache the plan which is invalid on the second pass since the table being referenced is gone (replaced by a new ab table). ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster