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

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: zeroimpl(at)gmail(dot)com
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: BUG #15913: Could not open relation with oid on PL/pgSQL method referencing temporary table that got recreated
Date: 2019-08-15 19:23:31
Message-ID: 23768.1565897011@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

PG Bug reporting form <noreply(at)postgresql(dot)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

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Andres Freund 2019-08-15 19:42:13 Re: BUG #15960: ON CONFLICT Trying accessing to variables
Previous Message Peter Geoghegan 2019-08-15 17:09:14 Re: BUG #15960: ON CONFLICT Trying accessing to variables