rules vs triggers

Поиск
Список
Период
Сортировка
От admin
Тема rules vs triggers
Дата
Msg-id Pine.BSF.4.10.10001150132330.86487-100000@server.b0x.com
обсуждение исходный текст
Список pgsql-general
After reading chapters 8 and 13 of the Programmer's Guide, I thought I
understood the pros and cons of using rules vs triggers. After writing my
own, I'm still not sure I understand.

For example, lets take the check_primary_key() function in the referential
integrity trigger [contrib/spi/refint.c]. The same code could've been
written using rules since there is no need for checking validity. I
thought the rule of thumb was: "use rules as much as possible, unless you
need to check for valid values." -- my understanding

I seem to be missing a few valuable points about rules and triggers, I'd
appreciate if someone could nudge me in the right direction.

Marc


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

Предыдущее
От: Gerald Sievers
Дата:
Сообщение: Re: Postgresql Perl Problem
Следующее
От: "Oliver Elphick"
Дата:
Сообщение: Re: [GENERAL] New To List