Subject Re: [Firebird-Architect] Database triggers
Author Martijn Tonies
> > > > > Comments?
> > > >
> > > > Sure. Why not create a table RDB$DATABASE_TRIGGERS instead of
> getting
> > > > "incompatible values" in RDB$TRIGGER_TYPE.
> > >
> > > Why not link the triggers to the RDB$Database table?
> > >
> > > It would seem very appropriate since we are talking about database
> level
> > > actions.
> > >
> > > So, the syntax would be:
> > > CREATE TRIGGER <name> <type> ON RDB$Database AS ...
> > >
> > >
> > > Adriano,
> > >
> > > This would be a very good thing!
> >
> > This sounds like you're creating a normal trigger on a system table.
> > Doesn't
> > make sense to me Sean :-)
>
> You'll note that the syntax provides for <type> which denotes a special
> class of trigger.
>
> I'm just saying that it makes more sense to relate the system triggers
> with the RDB$Database table, since the triggers will be in the context
> of the database.
>
> Can you think of any reason why a developer would create a trigger on
> the RDB$Database table?

Well, given that triggers on system table don't "stick", no.

>
> It seems to be a better solution than creating a new table just for this
> purpose.

A system table exists to store metadata. Sounds fine to me.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com