Re: BUG #3423: cache on temporary tables in plpgsql - Mailing list pgsql-bugs

From Pavel Stehule
Subject Re: BUG #3423: cache on temporary tables in plpgsql
Date
Msg-id 162867790707010402l1b4696f3hcf0c275b71549c63@mail.gmail.com
Whole thread Raw
In response to BUG #3423: cache on temporary tables in plpgsql  ("vituko" <vituko@gmail.com>)
List pgsql-bugs
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
>

pgsql-bugs by date:

Previous
From: "vituko"
Date:
Subject: BUG #3423: cache on temporary tables in plpgsql
Next
From: "Holger Schurig"
Date:
Subject: BUG #3422: Segmentation violation in PL/pgSQL