2015-07-23 9:06 GMT+02:00 Tim Smith <randomdev4+postgres@xxxxxxxxx>:
So tell me guys, instead of bashing away at the fact I only quoted
half a sentence or whatever, how about you answer the following :
What exactly is was the design decision that lead to TRUNCATE being
supported by triggers but not by rules ?
Someone had time to implement it for triggers, no-one had time for rules.
I suspect that TRUNCATE was added to triggers because some dev thought
it would be a neat idea, and it was never implemented in rules as a
result of an accidental omission for <whatever reason> rather than a
deliberate design constraint.
It is a neat idea for tiggers. Slony uses that to replicate TRUNCATE on slaves of a Slony cluster.
It wouldn't be such a neat idea for rules as, IIRC, rules are only supported because views are based on them. Without that, they would probably be ripped out of the code.
--