Re: "disappearing" rows in temp table, in recursing trigger

From: "Eric Worden" <worden(dot)eric(at)gmail(dot)com>
To: "Craig Ringer" <craig(at)postnewspapers(dot)com(dot)au>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "disappearing" rows in temp table, in recursing trigger
Date: 2008-12-30 20:38:12
Message-ID: 569f05d30812301238w4610232eub919106183e9bbe8@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you this helped me fix it. I moved the "create temporary
table..." statement to the outermost calling function and changed it
from STABLE to VOLATILE. I'm not sure which change made the
difference -- I had to move the create table statement for an
additional reason.

On Sat, Dec 27, 2008 at 1:14 AM, Craig Ringer
<craig(at)postnewspapers(dot)com(dot)au> wrote:
> Eric Worden wrote:
>
>> The recursive function creates a temp table [...] I
>> have version 8.1.10.
>
> While I haven't looked in detail, I'd be surprised if this wasn't an
> issue with pre-8.3 versions lack of any way to automatically re-generate
> cached plans in functions.
>
> Try running your code on an 8.3 installation and see if you still get
> the issue. I strongly suspect you won't.
>
> If this does prove to be the case, there are workarounds for pre-8.3
> versions, usually involving the use of EXECUTE to bypass the cache and
> force re-planning of statements at every execution. However, if it's
> practical to do so upgrading to 8.3 might be a nicer and (in the long
> run) easier option.
>
> --
> Craig Ringer
>

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Derek Liang 2008-12-30 22:33:46 return X number of refcursors from a function
Previous Message Devrim GÜNDÜZ 2008-12-30 20:12:41 New shapshot RPMs (Dec 29, 2008) are ready for testing