| From: | "J(dot)Fernando Moyano" <txinete(at)wanadoo(dot)es> |
|---|---|
| To: | pgsql-sql(at)postgresql(dot)org |
| Subject: | ON DELETE rule |
| Date: | 2001-04-01 08:09:38 |
| Message-ID: | 01040110093800.01615@txino.mikasa.eh |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
I'm trying to do something like this:
CREATE RULE piezas_delete AS
ON delete TO piezas
DO update materia_prima set usadas=(usadas-1)
where n_material=old.n_material;
The rule is created. OK .... but the action doesn't run like it's supossed.
¿What is wrong?
Is "old" usable with "ON DELETE" rules ???
I think delete action its performed AFTER rule action .... ¿OK?
So ... it's possible to access field values of delete affectted registers?
--
Fernando Moyano
Frase del día:
--------------
No hay cita. Solo son imaginaciones tuyas!!.
(*) SymeX ==> http://symex.lantik.com
(*) WDBIL ==> http://wdbil.sourceforge.net
(*) Informate sobre LINUX en http://www.linux.org
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Richard Huxton | 2001-04-01 16:35:35 | Re: Trigger Function and Html Output |
| Previous Message | Stef Telford | 2001-04-01 07:50:20 | Trigger Function and Html Output |