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
---------------------------------------------------------
---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings