Re: Create trigger problem :

Поиск
Список
Период
Сортировка
От Mark G. Gilmore
Тема Re: Create trigger problem :
Дата
Msg-id 98isoh$2irm$1@news.tht.net
обсуждение исходный текст
Список pgsql-general
Instead of sending old.ldArt in as a parameter, try just referencing old
inside the function body.
So the function then has no argument.

Mark



"De Leeuw Guy" <G.De_Leeuw@eurofer.be> wrote in message
news:98imbv$2hk2$1@news.tht.net...
> 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 по дате отправления:

Предыдущее
От: Renaud Tthonnart
Дата:
Сообщение: Re: Counting elements of an array
Следующее
От: Bill Huff
Дата:
Сообщение: Re: Poor Delete performance