Re: Cache Lookup failed Error - while using Triggers
От | Joe Conway |
---|---|
Тема | Re: Cache Lookup failed Error - while using Triggers |
Дата | |
Msg-id | 3D8160BE.7050409@joeconway.com обсуждение исходный текст |
Ответ на | Cache Lookup failed Error - while using Triggers ("shreedhar" <shreedhar@lucidindia.net>) |
Список | pgsql-admin |
shreedhar wrote: > Hi Joe, > > Thanks Alot, > > I followed how u said, then if I execute the same insert statement the > following error is occuring. > > ERROR : Parse error at or near "empname" > > As I Check I didnot find any parse error there. This is error is occuring if > and only if 'emp' table have trigger. Is there any problem in function > 'aa_emp_stamp()' I don't know what aa_emp_stamp() looks like. The function you sent in the other day was called emp_stamp() -- is that the same? If so, you were missing as ";": 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 ^^^^ missing a ; Joe
В списке pgsql-admin по дате отправления: