Hello
It's not bug. Solution is simple. You cannot drop temp table ever.
Temp table is automaticly dropped when session is aborted.
http://www.pgsql.cz/index.php/Automatic_execution_plan_caching_in_PL/pgSQL
In PostgreSQL 8.3 this problem is solved.
Regards
Pavel Stehule
2007/6/30, vituko <vituko@gmail.com>:
>
> The following bug has been logged online:
>
> Bug reference: 3423
> Logged by: vituko
> Email address: vituko@gmail.com
> PostgreSQL version: 7.4
> Operating system: debian sarge
> Description: cache on temporary tables in plpgsql
> Details:
>
> "relation with OID ##### does not exist" errors when accessing temporary
> tables in PL/PgSQL functions
>
> related :
> bug : 2005-12/msg00207.php :
> possible solution :
> faq : 4.19
> but :
>
> I'm working on 7.4 and execute command cannot return any value (execute into
> is not implemented). So I cannot see any alternative. Any suggestions?
>
> I have a loop "for record in select...", for each record, I get a table name
> and then I do an 'execute query', creating a temporary table and from this
> temporary table I need a field value.
>
> What can I do?
>
> Thank you very much.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend
>