Re: "Cache lookup failed for function" when recreating procs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Chris Fischer" <Chris(dot)Fischer(at)channeladvisor(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: "Cache lookup failed for function" when recreating procs
Date: 2007-03-07 18:36:59
Message-ID: 21190.1173292619@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Chris Fischer" <Chris(dot)Fischer(at)channeladvisor(dot)com> writes:
> I'm attempting to write a function which produces a script. The script
> will contain steps necessary to drop/recreate all the functions.

If you're trying to modify functions that are in live use, don't drop
them. Just apply CREATE OR REPLACE FUNCTION. This avoids breaking
cached plans that refer to the function(s) by OID.

regards, tom lane

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ed L. 2007-03-07 20:10:19 Re: invalid page header in pg_statistic
Previous Message Chris Fischer 2007-03-07 17:28:57 "Cache lookup failed for function" when recreating procs