Rule or Function and Trigger?

Поиск
Список
Период
Сортировка
От James B. Byrne
Тема Rule or Function and Trigger?
Дата
Msg-id 38275.216.185.71.24.1238768980.squirrel@webmail.harte-lyne.ca
обсуждение исходный текст
Ответы Re: Rule or Function and Trigger?  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
I am beginning to migrate some functionality from an application
prototype into the DBMS.  One of these elements is time stamping row
insertions and updates.

I have been reading about rules, functions and triggers in regards
to this issue.  So, of course, now I have myself completely
befuddled.  From what I can determine from the documentation, it
makes little difference to the DBMS whether I set a rule on insert
and one on update for each table or define a function and set a
trigger for insert or update on each table.

If this is indeed the case then which way is the preferred method?
If one looks at things from a code maintenance standpoint it appears
the the function and trigger approach is preferable.  Is it?

Opinions?


--
***          E-Mail is NOT a SECURE channel          ***
James B. Byrne                mailto:ByrneJB@Harte-Lyne.ca
Harte & Lyne Limited          http://www.harte-lyne.ca
9 Brockley Drive              vox: +1 905 561 1241
Hamilton, Ontario             fax: +1 905 561 0757
Canada  L8E 3C3


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

Предыдущее
От: Gerd König
Дата:
Сообщение: high load on server
Следующее
От: Scott Marlowe
Дата:
Сообщение: Re: high load on server