trigger compile problem - Mailing list pgsql-general

From T.R.Missner@Level3.com
Subject trigger compile problem
Date
Msg-id EBFCF3982143D511A77F0008C716807E0106DB2C@N0400IDC1.oss.level3.com
Whole thread Raw
List pgsql-general
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

pgsql-general by date:

Previous
From: Jan Wieck
Date:
Subject: Re: Functions
Next
From: Doug McNaught
Date:
Subject: Re: trigger compile problem