pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Martin Marques <martin@bugs.unl.edu.ar>
To: pgsql-sql@postgresql.org
Subject: Problems with temp table and PL
Date: Wed, 21 Feb 2007 18:17:50 -0300 (ART)
Message-ID: <Pine.LNX.4.64.0702211814100.18736@bugs.unl.edu.ar> (raw)

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
---------------------------------------------------------


view thread (3+ messages)  latest in thread

Message-ID: <Pine.LNX.4.64.0702211814100.18736@bugs.unl.edu.ar>
Permalink:  ../Pine.LNX.4.64.0702211814100.18736@bugs.unl.edu.ar/
Also on:    postgresql.org/message-id/Pine.LNX.4.64.0702211814100.18736@bugs.unl.edu.ar

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: martin@bugs.unl.edu.ar
  Subject: Re: Problems with temp table and PL
  In-Reply-To: <Pine.LNX.4.64.0702211814100.18736@bugs.unl.edu.ar>
  References: <Pine.LNX.4.64.0702211814100.18736@bugs.unl.edu.ar>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox