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

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

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Eric Worden <worden(dot)eric(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "disappearing" rows in temp table, in recursing trigger
Date: 2008-12-27 09:14:15
Message-ID: 4955F1E7.8080306@postnewspapers.com.au (view raw or flat)
Thread:
Lists: pgsql-general
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

pgsql-general by date

Next:From: Ivan Sergio BorgonovoDate: 2008-12-27 11:14:33
Subject: subselect and count (DISTINCT expression [ , ... ] ) performances
Previous:From: David FetterDate: 2008-12-27 07:10:43
Subject: Re: WITH AS vs subselect was: count (DISTINCT expression[ , ... ] ) and documentation

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