Hello,
The temporary table will be dropped automatically at the end of the
function, right?
A temp table will be dropped at the end of the connection. You can
reuse it by adding ON COMMIT DELETE ROWS and then check
if it exists in your function with this other function:
Hello,
A question about index for temporary table.
Postgresql 8.0.1, in a pl/pgsql function:
begin
...
-- Part I
create temporal table t1 as ((select ... from .. left join . where
... ) union (select .. from ... left join ... where ... ));
create index idx_t1_cols on t1(col1, col2)
Emi Lu wrote:
The temporary table will be dropped automatically at the end of the
function, right?
A temp table will be dropped at the end of the connection. You can reuse
it by adding ON COMMIT DELETE ROWS and then check
if it exists in your function with this other function: