create trigger question
От | Andreas Joppich |
---|---|
Тема | create trigger question |
Дата | |
Msg-id | 3503F8A9.4EC6@T-Mobil.de обсуждение исходный текст |
Ответы |
Re: [HACKERS] create trigger question
|
Список | pgsql-hackers |
Hi all, at work I´m using RDB 6.2. I can create triggers with the following command: AFTER UPDATE OF SIM_ICCV_L, SIM_ICCNR_L, START_DATUM_D, STAT_SEIT_D, PREISKLASSE_T ON ent_TEILNEHMER REFERENCING OLD AS update_old NEW AS update_new ( UPDATE ent_TEILNEHMER t SET t.update_l = update_old.update_l + 1, t.insert_datum_d = cast(current_timestamp as date) WHERE ent_TEILNEHMER.dbkey = t.dbkey ) FOR EACH ROW; or: AFTER INSERT ON ent_TEILNEHMER (UPDATE ent_TEILNEHMER t SET t.update_l = 1, t.insert_datum_d = cast(current_timestamp as date) WHERE ent_TEILNEHMER.dbkey = t.dbkey) FOR EACH ROW; With postgresql 6.2 or 6.3 I must use a user defined function to get the same result. Will there be some enhancements to triggers to use the above syntax ? I think, RDB is more user friendly ( at least for trigger defintions)... Bye Andreas
В списке pgsql-hackers по дате отправления: