use of temporary tables in functions - Mailing list pgsql-general

From Administrator
Subject use of temporary tables in functions
Date
Msg-id 5.1.0.14.0.20020417160116.00a1dbb0@192.168.0.12
Whole thread Raw
Responses Re: use of temporary tables in functions  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
List pgsql-general
Hi,

While using a temporary table in a function, it seems that after dropping the table it stays in the functions cache.

create function tmp_fn() returns integer as'
begin
        create temporary table test(id integer primary key, x_val integer);
        insert into test (id, x_val) values(1,2);
        drop  table test;
return 1;
end;'
language 'plpgsql';

The next time it comes back with a message "Relation 128863 does not exist". How can we avoid the oid of the table from being left in the cache?

Thanks,
Alfred

www.traveljadoo.com - we add magic to your travel

pgsql-general by date:

Previous
From: Jean-Michel POURE
Date:
Subject: Re: Insert Unicode
Next
From: Matthew Stanfield
Date:
Subject: Incorrect password using pg_ctl