Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 44EF2475AE5 for ; Thu, 12 Sep 2002 23:53:10 -0400 (EDT) Received: from joeconway.com (unknown [63.210.180.150]) by postgresql.org (Postfix) with ESMTP id 16D73475A9E for ; Thu, 12 Sep 2002 23:53:06 -0400 (EDT) Received: from [192.168.5.3] (account jconway HELO joeconway.com) by joeconway.com (CommuniGate Pro SMTP 3.5.9) with ESMTP-TLS id 1327599; Thu, 12 Sep 2002 20:35:05 -0700 Message-ID: <3D8160BE.7050409@joeconway.com> Date: Thu, 12 Sep 2002 20:51:26 -0700 From: Joe Conway User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 To: shreedhar Cc: Postgres Subject: Re: Cache Lookup failed Error - while using Triggers References: <003101c2594d$f1b24060$1201a8c0@a4005> <3D7ECFBB.2040202@joeconway.com> <005a01c25959$6a35fe40$1201a8c0@a4005> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200209/148 X-Sequence-Number: 5687 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