Re: PGplSql: Relation 44451 does not exist - Mailing list pgsql-general

From Richard Huxton
Subject Re: PGplSql: Relation 44451 does not exist
Date
Msg-id 40D7EEA9.4030807@archonet.com
Whole thread Raw
In response to PGplSql: Relation 44451 does not exist  ("Kuti Attila" <attila.kuti@deepblue.hu>)
List pgsql-general
Kuti Attila wrote:
> Hi,
>
> I have a pgplsql function. It is quite short and simple.
>
> The problem:
>
> The following error message comes up for the SECOND time I call the it
> "Relation 44451 does not exist"
>
> In the function I create a temporary table, and at the end I drop it. There
> may be problem with this ? I don't know.

Plpgsql is compiled, so it refers to tables via their OID. The second
time around Tmembers has a different OID and so you get your error message.

The solution is to use the EXECUTE construct when accessing the table,
or to use an interpreted language (e.g. pltcl).

HTH
--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: "Scott Marlowe"
Date:
Subject: Do we need more emphasis on backup?
Next
From: Pavel Stehule
Date:
Subject: Re: PGplSql: Relation 44451 does not exist