Re: BUG #3450: Multiple Stored procedure calls cause issue with temp tables...

From: Neil Conway <neilc(at)samurai(dot)com>
To: Chris Bowlby <excalibur(at)accesswave(dot)ca>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #3450: Multiple Stored procedure calls cause issue with temp tables...
Date: 2007-07-17 07:32:47
Message-ID: 1184657567.6187.23.camel@goldbach
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Tue, 2007-17-07 at 00:51 +0000, Chris Bowlby wrote:
> Using a temporary table of the same name in repeated calls to a stored
> procedure are causing OID failure issues

This is a (well) known bug. The problem arises because plpgsql caches
the query plan used to access the temporary table, which includes the
temp table's OID; when a new temp is created, it is assigned a new OID,
but the cached plan is not discarded.

The bug will be fixed in 8.3 (cached plans are now invalidated when
dependent DB objects change). In the mean time, you can workaround the
problem by always accessing the temporary table with EXECUTE -- see the
list archives for prior discussion.

-Neil

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Hiroshi Saito 2007-07-17 07:45:03 Re: BUG #3453: Error on COPY TO/FROM 'non-ascii-path'
Previous Message Heikki Linnakangas 2007-07-17 07:30:25 Re: BUG #3450: Multiple Stored procedure calls cause issue with temp tables...