From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | shreedhar <shreedhar(at)lucidindia(dot)net> |
Cc: | Postgres <pgsql-admin(at)postgresql(dot)org> |
Subject: | Re: Cache Lookup failed Error - while using Triggers |
Date: | 2002-09-13 03:51:26 |
Message-ID: | 3D8160BE.7050409@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2002-09-13 04:30:09 | Re: Vaccuum/Analyze |
Previous Message | Naomi Walker | 2002-09-13 01:09:03 | Re: Vaccuum/Analyze |