From: J.Fernando Moyano <txinete@wanadoo.es>
To: pgsql-sql@postgresql.org
Subject: ON DELETE rule
Date: Sun, 1 Apr 2001 10:09:38 +0200
Message-ID: <01040110093800.01615@txino.mikasa.eh> (raw)
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: txinete@wanadoo.es
Subject: Re: ON DELETE rule
In-Reply-To: <01040110093800.01615@txino.mikasa.eh>
References: <01040110093800.01615@txino.mikasa.eh>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox