Can anyone out there help me.
I have created a trigger and can't get it to run.
When it is invoked I get a compile error no matter what.
.I have changed the code in the trigger many times and it really doesn't
matter what the code actually does it still won't compile.
I have stripped it down so all it does is return NEW and still the problem.
here is the error
ERROR: parse error at or near ""
here is the code
CREATE FUNCTION "AANEW" () RETURNS opaque AS '
DECLARE myrec sipmsg_lu%ROWTYPE;
BEGIN
SELECT INTO myrec * FROM sipmsg_lu WHERE callid=''NEW.callid'';
IF NOT FOUND THEN
INSERT INTO sipmsg_lu VALUES (NEW.time , ''NEW.callid'');
END IF;
RETURN NEW;
END' LANGUAGE 'plpgsql';
any help would be great.
red hat 2.2 kernal
pgsql 7.1.3
t.r. missner