Create trigger problem : - Mailing list pgsql-general

From De Leeuw Guy
Subject Create trigger problem :
Date
Msg-id 001401c0a88d$5ab01c40$a53200c3@PCGDL
Whole thread Raw
Responses Re: Create trigger problem :
List pgsql-general
Hi all,

I try this :

CREATE FUNCTION DelArtFather(INT4)
 RETURNS INT4
 AS '
  DELETE FROM TArticles WHERE IdArtFather = $1;
  SELECT 1 AS ignore_this
 '
 LANGUAGE 'sql';

CREATE TRIGGER trigger_TArticles
 BEFORE DELETE ON TArticles
 FOR EACH ROW EXECUTE PROCEDURE DelArtFather(old.IdArt);

and i obtain this error :

ERROR: parse error at or near "old"

How can i correct my command ??

Thanks in advance

Guy De Leeuw



pgsql-general by date:

Previous
From: "Gordon A. Runkle"
Date:
Subject: Re: COPY problem
Next
From: Marc Wrubleski
Date:
Subject: Determine Time in other Time Zone