Alvaro Herrera wrote:
> My thinking is that a TRUNCATE trigger is a per-statement trigger which
> doesn't have access to the set of deleted rows.
> In that way it would be different from a per-statement trigger for
> DELETE.
Completely agree.
A truncate trigger should run a different function to a delete trigger.
This is an important feature for trigger-based replication systems. Not
just slony, but bucardo and others too. It's an embarrassing hole in our
high availability capabilities and we really need to fill the gap. We
can't always control whether an application will issue truncates or
not.
Rather spookily that's what I've been working on this afternoon, though
I didn't realise this thread was in progress until now, nor did I
realise there might be possible objections. I do hope the importance of
it is enough to overcome objections.
Yes, it does look fairly straightforward. Should be ready for when 8.4
opens, assuming we agree.
-- Simon Riggs 2ndQuadrant http://www.2ndQuadrant.com