Problems with temp table and PL

Поиск
Список
Период
Сортировка
От Martin Marques
Тема Problems with temp table and PL
Дата
Msg-id Pine.LNX.4.64.0702211814100.18736@bugs.unl.edu.ar
обсуждение исходный текст
Ответы 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>)
Список 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 по дате отправления:

Предыдущее
От: "Sergio Andreozzi"
Дата:
Сообщение: how to generate a list of distinct scalar values from a column which type is array
Следующее
От: Andrew Sullivan
Дата:
Сообщение: Re: Problems with temp table and PL