Subject Re: [IBO] update IBO$SCHEMA_VERSION from system table triggers
Author Claudio Valderrama C.
"Geoff Worboys" <geoff@...> wrote in message
news:1533298078.20020402101649@......
> > Are there any problems with this solution ? e.g. I don't know if
> > custom triggers on system tables are restored after a backup &
> > restore operation.
>
> As I understand it additional triggers on the system tables should
> backup and restore OK.

It's interesting to see what happens when one clicks randomly in a thread
once per month on this list.
:-)

Additional triggers do not work on system tables.
They will run after you created them.
However, as soon as the last attachment is finished, the engine will unload
that database (left out the garbage collection delay).
When you login again, system tables' metadata is loaded from internal,
in-memory structures or the engine will not be able to load any db (infinite
recursion, chicken and egg, etc.) and this means only the known metadata is
acknowledged. No extra field in system tables, no user trigger on system
tables will be loaded. Your custom triggers won't work anymore although the
information is stored in the db. The only cumbersome way is to do a dummy
change to those triggers (like toggling the active state) that will force
metadata loading from system tables but to be elegant, you would have to
know this is the first attachment, otherwise do nothing.
It's a logged limitation in the FB's bug tracker. Tricky and dangerous to
solve.

C.
--
Claudio Valderrama C. - http://www.cvalde.com - http://www.firebirdSql.org
Independent developer
Owner of the Interbase® WebRing