Problems with temp table and PL - Mailing list pgsql-sql

From Martin Marques
Subject Problems with temp table and PL
Date
Msg-id Pine.LNX.4.64.0702211814100.18736@bugs.unl.edu.ar
Whole thread Raw
Responses Re: Problems with temp table and PL  (Andrew Sullivan <ajs@crankycanuck.ca>)
Re: Problems with temp table and PL  ("A. Kretschmer" <andreas.kretschmer@schollglas.com>)
List pgsql-sql
I create a temp table inside a plpgsql function, which is drop just before
ending (the function).

My problem is that if I execute the same function again (in the same
session) I get an error when trying to insert data into it (looks like the
session has an old reference of the table):

=> SELECT actualizacionAnualProximoHabil(2008);
ERROR:  relation with OID 9668312 does not exist
CONTEXT:  SQL statement "INSERT INTO dias_semana VALUES ( $1 )"
PL/pgSQL function "actualizacionanualproximohabil" line 9 at SQL statement

As I said, the first execution works OK, but from then on it gives this
error, until I close the session and open it again.

Any ideas?

-- 21:50:04 up 2 days,  9:07,  0 users,  load average: 0.92, 0.37, 0.18
---------------------------------------------------------
Lic. Martín Marqués         |   SELECT 'mmarques' ||
Centro de Telemática        |       '@' || 'unl.edu.ar';
Universidad Nacional        |   DBA, Programador,    del Litoral             |   Administrador
---------------------------------------------------------

pgsql-sql by date:

Previous
From: "Sergio Andreozzi"
Date:
Subject: how to generate a list of distinct scalar values from a column which type is array
Next
From: Andrew Sullivan
Date:
Subject: Re: Problems with temp table and PL