From: | Andreas Joppich <andreas(dot)joppich(at)T-Mobil(dot)de> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | create trigger question |
Date: | 1998-03-09 14:11:53 |
Message-ID: | 3503F8A9.4EC6@T-Mobil.de |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Martin | 1998-03-09 14:26:49 | Re: [HACKERS] How to...? |
Previous Message | Mattias Kregert | 1998-03-09 14:07:27 | Re: [HACKERS] Re: [QUESTIONS] Testing Postgresql v6.3 |