Create trigger problem :

From: "De Leeuw Guy" <G(dot)De_Leeuw(at)eurofer(dot)be>
To: pgsql-general(at)postgresql(dot)org
Subject: Create trigger problem :
Date: 2001-03-12 14:21:09
Message-ID: 98imbv$2hk2$1@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marcelo Pereira 2001-03-12 15:07:13 Delete Cascade
Previous Message Frank Joerdens 2001-03-12 10:19:53 Re: Data type for storing images?