Re: BUG #15913: Could not open relation with oid on PL/pgSQL method referencing temporary table that got recreated - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #15913: Could not open relation with oid on PL/pgSQL method referencing temporary table that got recreated
Date
Msg-id 23768.1565897011@sss.pgh.pa.us
Whole thread Raw
In response to BUG #15913: Could not open relation with oid on PL/pgSQL method referencing temporary table that got recreated  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> I have some SQL which works fine in 9.x and 10.x, but fails in 11.x and 12.x
> (I tested on various Docker images).
> One of the functions declares a variable whose type matches a temporary
> table. If I drop and recreate that temporary table twice in the same
> session, I get an error like: "ERROR:  could not open relation with OID
> xxx". This occurs on the second call to the DoSomething() function after the
> temporary table has been recreated.

I've pushed a fix for this -

https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=6070ccdd179f34efecc92d6679a141093df0f879

Thanks for the report!

            regards, tom lane



pgsql-bugs by date:

Previous
From: Peter Geoghegan
Date:
Subject: Re: BUG #15960: ON CONFLICT Trying accessing to variables
Next
From: Andres Freund
Date:
Subject: Re: BUG #15960: ON CONFLICT Trying accessing to variables