Skip site navigation (1) Skip section navigation (2)

Re: BUG #2277: Can't Open Relation when returning data from a stored procedure

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrew Nykolyn" <nykolyn(at)ngc(dot)com>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #2277: Can't Open Relation when returning data from a stored procedure
Date: 2006-02-21 15:56:40
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-bugs
"Andrew Nykolyn" <nykolyn(at)ngc(dot)com> writes:
> When running a stored procedure that loads data into a temporary table, the
> following error occurs when returning the result set through a composite
> data type.
> 	Could not open relation with OID 443748

It looks to me like you're running into the same issue described here:
namely that a toasted datum is still in memory after the owning table
has been dropped, and so subsequent attempts to expand the datum fail.

I'm not sure there is any really nice fix for that --- the easy fix
of forcibly detoasting everything before plpgsql stores it anyplace
would have very unpleasant performance implications.  Needs more thought.

Curious that this behavior has been there unremarked since 7.1 or so
and now two different people stumble across it within a couple of weeks
of each other.

			regards, tom lane

In response to

pgsql-bugs by date

Next:From: KarunaiMohamed KA.Date: 2006-02-21 18:06:59
Subject: Need Help
Previous:From: Sears, JeremyDate: 2006-02-21 14:41:48
Subject: A bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group