Subject Re: [firebird-support] Can a trigger not to be fired by a dedicate user (application)?
Author Nando Dessena
Helen,

H> Nope. It would totally defeat the purpose of triggers, which is to
H> implement the business rules independently of any client application.

one situation in which it is generally useful to do that is
replication (or data mergin in general), where you don't want some of
the target's database insert/update triggers to fire for various
reasons (useless redundancy, decreased update speed). This kind of
things in Firebird is done by checking CURRENT_USER and reserving
special user names to the tools (like the replicator). I guess it
could also be made on CURRENT_ROLE but I've never done that.

H> If you ask, could one implement something like what you ask? the answer
H> would be "Yes", it's not impossible." Only insane.

I don't think that wanting to log activity from one or more
particular applications but not all is insane. Many RDBMSs support this
concept. Yet I think that using roles provides an adequate workaround.

Ciao
--
Nando Dessena
http://www.flamerobin.org
======================================================
I support Firebird, I am a Firebird Foundation member!
Join today at http://www.firebirdsql.org/ff/foundation
======================================================