Re: SQL Exception Relation xxx does not exist - Mailing list pgsql-general

From Kris Jurka
Subject Re: SQL Exception Relation xxx does not exist
Date
Msg-id Pine.LNX.4.33.0401200010330.19559-100000@leary.csoft.net
Whole thread Raw
In response to SQL Exception Relation xxx does not exist  (Alex <alex@meerkatsoft.com>)
Responses Re: SQL Exception Relation xxx does not exist
List pgsql-general

On Tue, 20 Jan 2004, Alex wrote:

> Hi,
> I am getting the following error when running an update from a JAVA
> program using a Tomcat Connection Pool.
>
> SQLException: Error Relation 215106760 does not exist
>
> In the server log I see additional info Error occured while executing
> PL/pgSQL function funcName
> line 105 at select into variables

This error is likely the result of using a temp table without EXECUTE or
having one of your tables dropped (recreating it won't help).  plpgsql
caches query plans, but doesn't track the plans dependencies, so if any of
the underlying objects change you can get this error.

> 2. Could this be a problem with the connection pool of tomcat or the
> postgres JDBC driver ?

The plans are cached once per backend, the connection pool keeps that same
backend open forever which means you can never safely change your
schema without restarting the pool.

> 3. how do i find out the name of the actual object referred by 215106760
> in the error message?
>

SELECT relname FROM pg_class WHERE oid = 215106760;

Kris Jurka


pgsql-general by date:

Previous
From: Alex
Date:
Subject: SQL Exception Relation xxx does not exist
Next
From: Devrim GUNDUZ
Date:
Subject: erServer (was: Re: Postgress and MYSQL)