Problems with a Trigger Statement

Поиск
Список
Период
Сортировка
От Nathan Schile
Тема Problems with a Trigger Statement
Дата
Msg-id 407ED598.7030201@shiftyeyes.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Kuywan"
Дата:
Сообщение: Basix for Data General / Basix for Sco Unix
Следующее
От: "Matthew D. Fuller"
Дата:
Сообщение: Re: [OT] Tom's/Marc's spam filters?