From: | Martin Marques <martin(at)bugs(dot)unl(dot)edu(dot)ar> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org |
Subject: | Problems with temp table and PL |
Date: | 2007-02-21 21:17:50 |
Message-ID: | Pine.LNX.4.64.0702211814100.18736@bugs.unl.edu.ar |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
---------------------------------------------------------
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Sullivan | 2007-02-21 21:34:51 | Re: Problems with temp table and PL |
Previous Message | Sergio Andreozzi | 2007-02-21 18:21:09 | how to generate a list of distinct scalar values from a column which type is array |