Re: [SQL] ON DELETE rule

2001-04-01 Thread Tom Lane
"J.Fernando Moyano" <[EMAIL PROTECTED]> writes: > 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

[SQL] ON DELETE rule

2001-04-01 Thread J.Fernando Moyano
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" usa