Cache Lookup failed Error - while using Triggers
От | shreedhar |
---|---|
Тема | Cache Lookup failed Error - while using Triggers |
Дата | |
Msg-id | 003101c2594d$f1b24060$1201a8c0@a4005 обсуждение исходный текст |
Список | pgsql-admin |
Hi All, I took the following example to create trigger TABLE CREATE TABLE emp ( empname text, salary integer, last_date timestamp, last_user text); Function emp_stamp() returns OPAQUE DECLARE current_user text; BEGIN -- Check that empname and salary are given IF NEW.empname ISNULL THEN RAISE EXCEPTION ''empname cannot be NULL value''; END IF; IF NEW.salary ISNULL THEN RAISE EXCEPTION ''% cannot have NULL salary'', NEW.empname; ELSE current_user := NEW.empname; END IF -- Who works for us when she must pay for? IF NEW.salary < 0 THEN RAISE EXCEPTION ''% cannot have a negative salary'', NEW.empname; END IF; -- Remember who changed the payroll when NEW.last_date := ''now''; NEW.last_user := NEW.empname; RETURN NEW; END; Trigger CREATE TRIGGER emp_stamp BEFORE INSERT OR UPDATE ON emp FOR EACH ROW EXECUTE PROCEDURE emp_stamp(); If I use the following INSERT Statement INSERT INTO emp (empname,salary, last_date, last_user) VALUES ('sree',1000, '2002-09-11','sreedhar'); I am getting the following Error 'ERROR : fmgr_info : function 1059155 : cahce lookup failed PostgreSQL status : PGRES_FATAL_ERROR' Can any body tell that what is this error. How can I solve this. With Best Regards, Sreedhar Bhaskararaju 1,2nd Main Road, KottuGardens, Chennai - 600 085 Ph : 4475111 Email : shreedhar@lucidindia.net
В списке pgsql-admin по дате отправления: