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-09 11:37:37
Message-ID: 001401c0a88d$5ab01c40$a53200c3@PCGDL
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 Tom Lane 2001-03-09 14:39:54 Re: Escaping underscores in LIKE
Previous Message Richard Huxton 2001-03-09 08:55:04 Re: Escaping underscores in LIKE