Re: PL/pgSQL Trigger Problems - Mailing list pgsql-general

From Gregory Wood
Subject Re: PL/pgSQL Trigger Problems
Date
Msg-id 003901c0696a$dbf1ca40$7889ffcc@comstock.com
Whole thread Raw
In response to PL/pgSQL Trigger Problems  ("Gregory Wood" <gregw@com-stock.com>)
List pgsql-general
Apologies for replying directly back to you Dan, I'm used to replying back
to the list automatically... guess I got spoiled =)

Sadly, that doesn't appear to be it, unless there is something wrong with
the order of these operations:

DROP TRIGGER emp_stamp ON emp;
DROP FUNCTION emp_stamp();
DROP TABLE emp;
CREATE TABLE emp (...
CREATE FUNCTION emp_stamp () RETURNS OPAQUE AS '...
CREATE TRIGGER emp_stamp BEFORE INSERT OR UPDATE ON emp...
COMMIT;
INSERT INTO emp (empname,salary) VALUES ('John Doe',100000);

Any other suggestions?

> You dropped your function and recreated it, but did not drop your trigger.
> It is still linked to the old version of your function.  Just drop your
> trigger and recreate it and it should work fine.

> > Earlier, it was telling me that there was a Parse Error when I tried to
> > insert a value. Currently the error message I get is: "fmgr_info:
function
> > 4605120: cache lookup failed"





pgsql-general by date:

Previous
From: "Dan Harrington"
Date:
Subject: incrementing values
Next
From: Gerhard Häring
Date:
Subject: Problem creating native win32 libraries