Re: SQL Exception Relation xxx does not exist

From: Kris Jurka <books(at)ejurka(dot)com>
To: Alex <alex(at)meerkatsoft(dot)com>
Cc: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Re: SQL Exception Relation xxx does not exist
Date: 2004-01-20 05:16:32
Message-ID: Pine.LNX.4.33.0401200010330.19559-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-advocacy pgsql-general pgsql-hackers

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

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Devrim GUNDUZ 2004-01-20 07:16:45 erServer (was: Re: Postgress and MYSQL)
Previous Message Alex 2004-01-20 05:00:43 SQL Exception Relation xxx does not exist

Browse pgsql-general by date

  From Date Subject
Next Message Devrim GUNDUZ 2004-01-20 07:16:45 erServer (was: Re: Postgress and MYSQL)
Previous Message Alex 2004-01-20 05:00:43 SQL Exception Relation xxx does not exist

Browse pgsql-hackers by date

  From Date Subject
Next Message David Garamond 2004-01-20 06:20:31 Re: What's planned for 7.5?
Previous Message Alex 2004-01-20 05:00:43 SQL Exception Relation xxx does not exist