I’m trying to prevent any further input of a
particular field value via an insert rule with the following rule. CREATE OR REPLACE RULE rule_foovalue AS ON INSERT TO foo WHERE new.foovalue = 1 DO SELECT
fooexception.fooexception FROM fooexception() fooexception(fooexception); Basically the stored procedure that it calls raises an
exception. The behavior I wanted\excepted was to call the stored procedure when
foovalue = 1 and to execute a regular insert when foovalue <> 1. What its
doing is calling the stored procedure when foovalue = 1, that part works just
fine. However, when I try to insert a record into foo with any other value
besides 1 it actually inserts the record but doesn’t return the # of rows
affected. Is there something else I need to add to the rule so that it returns
the number of rows affected like normal? Thanks, |