Thread: 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
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
Michael Davis wrote: > > Setting NEW in an AFTER update or insert trigger is not wise. Try using a before update trigger instead. > I still get the error message. > -----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