> "Andrew" == Andrew Gierth writes:
> "Szima" == Szima Gábor writes:
Szima> Hi!
Szima> I found an "interest" in RULE's operation:
Andrew> All non-trivial* rules are wrong,
I should of course add: the solution is to use triggers instead, which
are much easier to understand and have v
> "Szima" == Szima Gábor writes:
Szima> Hi!
Szima> I found an "interest" in RULE's operation:
All non-trivial* rules are wrong, and this is a good illustration of
why.
CREATE RULE ruletest_rule AS ON INSERT TO ruletest DO INSERT INTO rulelog (id)
VALUES (NEW.id);
INSERT INTO ruletest (i
Hi!
I found an "interest" in RULE's operation:
CREATE TABLE ruletest (id int4);
CREATE TABLE rulelog (id int4, ts timestamp NOT NULL DEFAULT current_timestamp);
CREATE RULE ruletest_rule AS ON INSERT TO ruletest DO INSERT INTO rulelog (id)
VALUES (NEW.id);
INSERT INTO ruletest (id) VALUES (