Re: [GENERAL] Create trigger problem :

2001-03-13 Thread De Leeuw Guy
Thanks for your interest, I try also this but i receive the error : ERROR: ProcedureCreate: sql functions cnnot return type "opaque" ERROR: CreateTrigger: Function delartfather() does not exist here is my code : CREATE FUNCTION DelArtFather() RETURNS opaque AS ' DELETE FROM TArticles WHERE

Re: [GENERAL] Create trigger problem :

2001-03-12 Thread Stephan Szabo
Trigger functions need to take no arguments and return opaque. You can use NEW or OLD inside the function and arguments given in the create trigger statement are passed into the function in a special way (in plpgsql, it's TG_ARGV[] i believe) On Fri, 9 Mar 2001, De Leeuw Guy wrote: > Hi all, >

[GENERAL] Create trigger problem :

2001-03-12 Thread De Leeuw Guy
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