Problems with a Trigger Statement - Mailing list pgsql-general

From Nathan Schile
Subject Problems with a Trigger Statement
Date
Msg-id 407ED598.7030201@shiftyeyes.com
Whole thread Raw
List pgsql-general
I want the following trigger to update a related table when ever a
record is inserted/updated.  I have the following trigger:

CREATE TRIGGER update_status
  AFTER INSERT OR UPDATE
  ON public."Bug Status"
  FOR EACH ROW
  EXECUTE PROCEDURE public.update_status();

Which Calls this function:

CREATE OR REPLACE FUNCTION public.update_status()
  RETURNS trigger AS
'
    BEGIN
        UPDATE public."BugTracking" SET status = NEW.status WHERE
"BugTracking"."Tracking Number" = NEW."Tracking Number"
    END;
'
  LANGUAGE 'plpgsql' VOLATILE;


When I go to insert a record I receive the following error:

ERROR:  syntax error at or near ""
CONTEXT:  compile of PL/pgSQL function "update_status" near line 4

Any one know where I am going wrong?? Thanks!

pgsql-general by date:

Previous
From: "Kuywan"
Date:
Subject: Basix for Data General / Basix for Sco Unix
Next
From: "Matthew D. Fuller"
Date:
Subject: Re: [OT] Tom's/Marc's spam filters?