Re: ExecOpenScanR: failed to open relation

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pam Withnall <Pamw(at)zoom(dot)com(dot)au>
Cc: "'pgsql-hackers(at)postgresql(dot)org'" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: ExecOpenScanR: failed to open relation
Date: 2001-02-23 20:30:17
Message-ID: 29623.982960217@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pam Withnall <Pamw(at)zoom(dot)com(dot)au> writes:
> in my java code I am creating 3 temporary tables, then calling a stored
> procedure which calls another stored procedure.
> then I drop the temporary tables.
> the first time around , eveything is OK , then when repeating the action I
> get
> "ExecOpenScanR: failed to open relation 2808495 "

If you're using plpgsql, you can't drop and recreate temp tables between
procedure executions, because the cached query plans for the procedure
will still refer to the old version of the tables.

Either create the temp table *once* per backend, or use pltcl, which
doesn't try to cache query plans.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2001-02-23 20:38:45 Re: Utility program to read parameters of the current database
Previous Message Lamar Owen 2001-02-23 20:26:40 Re: beta5 packages ...