Re: Rules and Triggers: another question

Поиск
Список
Период
Сортировка
От Michael Paesold
Тема Re: Rules and Triggers: another question
Дата
Msg-id 007201c25a5b$4c513770$4201a8c0@beeblebrox
обсуждение исходный текст
Ответ на Re: Rules and Triggers  ("Adam Erickson" <adamre@cox.net>)
Список pgsql-sql
Jerome Chochon wrote:

> Thanks for your answer but i have another question.
> Which one is the faster ?
> 
> If i write this trigger...
> CREATE TRIGGER trigger_name
> BEFORE DELETE
> ON table_name
> FOR EACH ROW EXECUTE PROCEDURE function();
> 
> and this rule:
> CREATE RULE name_rule AS
> ON DELETE TO table_name
> DO select function();
> 
> When i delete values, whichone will call the value the first ?
> 
> Someone can help me ??

With the RULE, the function will be called earlier than with the TRIGGER.
(according to what Ross said before)

Regards,
Michael



В списке pgsql-sql по дате отправления:

Предыдущее
От: "Michael Paesold"
Дата:
Сообщение: Re: reset sequence
Следующее
От: "Gaetano Mendola"
Дата:
Сообщение: Select the max on a field