Subject Re: [Firebird-Architect] Re: On connect/disconnect trigger
Author Dmitry Yemanov
"paulruizendaal" <pnr@...> wrote:
>
> Suppose we disallow the use of :old and :new. In that case implementing
> database level triggers would not be so hard, I think.

A major problem is how they're represented in the system schema. I'm afraid
they don't fit RDB$TRIGGERS.

> How about DDL triggers? Adding the trigger action would not be so hard,
> but deferred work may cause conceptual problems around exactly when the
> trigger fires. Not sure here, never studied ddl/dfw in any detail.

I don't think people expect those triggers to run on commit, but most of the

actual work is deferred. Perhaps we could run pre-triggers at the DYN layer
(i.e. when the statement is running), while post-triggers could fire at DFW
stage 3 or 4 (when everything is done). Not very intuitive, but I fail to
see a better solution so far.

> How about the ddl for creating database and ddl triggers. Any
> conceptual or implementational issues there?

In fact, there's no create database DDL :-) It's just a client-side wrapper
for isc_create_database(). I don't think it deserves being triggers-aware.


Dmitry