Rule creation

From: Edoardo Causarano <curious(dot)dot(dot)corn(dot)at(dot)katamail(dot)dot(dot)com(at)postgresql(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Rule creation
Date: 2002-10-03 19:34:24
Message-ID: 200210032134.24682.EdoardoCausarano<curiousdotcornatkatamaildotcom>
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hello, I need help on this rule:

CREATE RULE rule AS ON INSERT TO table WHERE (sum(new."field") > 10) DO
INSTEAD NOTHING;
Creation is ok but in inserting a row I get the following from pgaccessII
number -2147467259
ERROR: fireRIRrules: failed to remove aggs from qual...
Removing the INSTEAD from the rule inhibits the error but makes the rule
pointless as the statement execution proceeds to the insertion.
I need a rule that denies insertions if the total of the rows with an active
attribute maxes out (guess what, a vacancy set).
I'm confused, any help?

--
9:33pm up 1:00, 1 user, load average: 0.87, 0.47, 0.21

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Bruce Momjian 2002-10-03 20:18:08 Re: [SQL] [GENERAL] CURRENT_TIMESTAMP
Previous Message Ron Johnson 2002-10-03 17:38:49 Re: Large databases, performance