Re: Truncate Triggers
От | Simon Riggs |
---|---|
Тема | Re: Truncate Triggers |
Дата | |
Msg-id | 1202046596.4252.120.camel@ebony.site обсуждение исходный текст |
Ответ на | Re: Truncate Triggers (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Truncate Triggers
|
Список | pgsql-hackers |
On Sat, 2008-02-02 at 17:38 -0500, Tom Lane wrote: > David Fetter <david@fetter.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
В списке pgsql-hackers по дате отправления: