Re: Delete rule does not prevent truncate - Mailing list pgsql-general

From Andrew Sullivan
Subject Re: Delete rule does not prevent truncate
Date
Msg-id 20150724100919.GA1956@crankycanuck.ca
Whole thread Raw
In response to Re: Delete rule does not prevent truncate  (Tim Smith <randomdev4+postgres@gmail.com>)
List pgsql-general
On Fri, Jul 24, 2015 at 10:24:55AM +0100, Tim Smith wrote:
>
> If that's how the developers feel about rules, i.e they can't be
> bothered to make any changes to the rules code any more, no matter how
> minor (e.g. this TRUNCATE issue)

Who is this "they"?  As I think I suggested in another mail, if you
think this is trivial and easy then I think you should propose the
patch to solve it.  I understand what you're saying; I think the
solution is self-evident (add a statement trigger that captures
TRUNCATE and DO INSTEAD NOTHING), so I just wouldn't be bothered to
fix this.  But I suspect things are the way they are partly because
nobody proposed or implemented a patch for this behaviour before.

The manual is also quite clear in what statements you can
write rules about; by implication, other statements are not covered,
so I'm not actually sure why you think the manual is misleading.

Best regards,

A
--
Andrew Sullivan
ajs@crankycanuck.ca


pgsql-general by date:

Previous
From: Andres Freund
Date:
Subject: Re: Delete rule does not prevent truncate
Next
From: Zdeněk Bělehrádek
Date:
Subject: Re: Using the database to validate data