Create trigger problem : - Mailing list pgsql-general

From De Leeuw Guy
Subject Create trigger problem :
Date
Msg-id 98imbv$2hk2$1@news.tht.net
Whole thread Raw
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: ryan@paymentalliance.net
Date:
Subject: Re: Data type for storing images?
Next
From: "Russell Hires"
Date:
Subject: Prompt question