From: Michael Davis <mdavis@sevainc.com>
To: 'Joseph Shraibman' <jks@selectacast.net>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: RE: plpgsql error: cache lookup from pg_proc failed
Date: Tue, 6 Feb 2001 19:03:14 -0700
Message-ID: <01C0906F.782F0190.mdavis@sevainc.com> (raw)
Setting NEW in an AFTER update or insert trigger is not wise. Try using a before update trigger instead.
-----Original Message-----
From: Joseph Shraibman [SMTP:jks@selectacast.net]
Sent: Tuesday, February 06, 2001 6:35 PM
To: pgsql-sql@postgresql.org
Subject: plpgsql error: cache lookup from pg_proc failed
playpen=# create table aa(
playpen(# a int,
playpen(# b int,
playpen(# t timestamp
playpen(# );
CREATE
playpen=#
playpen=#
playpen=# CREATE FUNCTION touch () RETURNS OPAQUE AS '
playpen'# BEGIN
playpen'# new.t := current_timestamp;
playpen'# RETURN new;
playpen'# END;
playpen'# ' LANGUAGE 'plpgsql';
CREATE
playpen=#
playpen=#
playpen=# CREATE TRIGGER lastmod_1 AFTER update or insert ON aa FOR EACH
ROW EXECUTE PROCEDURE touch();
CREATE
playpen=# insert into aa (a, b) values (1,2);
ERROR: plpgsql: cache lookup from pg_proc failed
What does this error message mean?
--
Joseph Shraibman
jks@selectacast.net
Increase signal to noise ratio. http://www.targabot.com
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: mdavis@sevainc.com, jks@selectacast.net
Subject: Re: plpgsql error: cache lookup from pg_proc failed
In-Reply-To: <01C0906F.782F0190.mdavis@sevainc.com>
References: <01C0906F.782F0190.mdavis@sevainc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox