Re: Truncate Triggers

From: Simon Riggs <simon(at)2ndquadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Fetter <david(at)fetter(dot)org>, Christopher Browne <cbbrowne(at)gmail(dot)com>, Gregory Stark <stark(at)enterprisedb(dot)com>, Decibel! <decibel(at)decibel(dot)org>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Truncate Triggers
Date: 2008-02-03 13:49:56
Message-ID: 1202046596.4252.120.camel@ebony.site
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, 2008-02-02 at 17:38 -0500, Tom Lane wrote:
> David Fetter <david(at)fetter(dot)org> writes:
> > On Sat, Feb 02, 2008 at 05:23:39PM -0500, Christopher Browne wrote:
> >> I think it would be nice to be able to have more "trigger hooks"
> >> relating to DDL changes, but I also think that will represent some
> >> fundamentally more difficult problems being raised than is the case
> >> for a TRUNCATE trigger.
>
> > Are they really?
>
> One fairly obvious difficulty is how to pass the trigger any meaningful
> information about what happened (or is about to happen). In the case of
> TRUNCATE, pretty much everything you need to know is implicit in the
> event type.

That's my thought also. I've got a feeling we could do lots of work and
DDL triggers still wouldn't pass all the information people might want.

I'm not against DDL triggers at all, but I honestly can't see a use for
them. Maybe there is a general case, or maybe just some specific cases.
I take Jim's point that many people have asked for them, but I don't
recall anybody explaining themselves in detail.

I note that both Oracle and SQLServer support DDL triggers, but the best
use case example I've seen is user configurable auditing. Do we need
that? If we do, we need autonomous transactions first anyway...

--
Simon Riggs
2ndQuadrant http://www.2ndQuadrant.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2008-02-03 15:56:32 Re: configurability of OOM killer
Previous Message Gregory Stark 2008-02-03 13:25:45 Re: configurability of OOM killer