Re: PL/pgSQL Trigger Problems

From: "Gregory Wood" <gregw(at)com-stock(dot)com>
To: "PostgreSQL-General" <pgsql-general(at)postgresql(dot)org>
Subject: Re: PL/pgSQL Trigger Problems
Date: 2000-12-19 03:22:03
Message-ID: 003901c0696a$dbf1ca40$7889ffcc@comstock.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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"

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Feng Xue 2000-12-19 07:56:30 Re: a "huge" table with small rows and culumns
Previous Message Matt Beauregard 2000-12-19 02:49:01 Re: increment/rank