From: Joe Conway <mail@joeconway.com>
To: shreedhar <shreedhar@lucidindia.net>
Cc: Postgres <pgsql-admin@postgresql.org>
Subject: Re: Cache Lookup failed Error - while using Triggers
Date: Thu, 12 Sep 2002 20:51:26 -0700
Message-ID: <3D8160BE.7050409@joeconway.com> (raw)
References: <003101c2594d$f1b24060$1201a8c0@a4005>
<3D7ECFBB.2040202@joeconway.com>
<005a01c25959$6a35fe40$1201a8c0@a4005>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: mail@joeconway.com, shreedhar@lucidindia.net
Subject: Re: Cache Lookup failed Error - while using Triggers
In-Reply-To: <3D8160BE.7050409@joeconway.com>
References: <003101c2594d$f1b24060$1201a8c0@a4005> <3D7ECFBB.2040202@joeconway.com> <005a01c25959$6a35fe40$1201a8c0@a4005> <3D8160BE.7050409@joeconway.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox