Subject | Re: [Firebird-Architect] On connect/disconnect trigger |
---|---|
Author | Jim Starkey |
Post date | 2006-06-02T11:39:08Z |
outerostic wrote:
triggers on system table -- virtual and real -- and use the existing
trigger mechanism (we've talked about virtual tables, but not in this
context). So, for example, if we had a virtual table of RDB$ATTACHMENTS
(I'd prefer SYSTEM.ATTACHMENTS, but that's a different issue), then
defining the appropriate triggers would give you exactly the information
and "events" that you need.
As for DDL triggers, there isn't any reason (other than easily changed
startup algorithms) that triggers couldn't be defined on system tables.
You must agree that defining a trigger on RDB$TRIGGERS has a certain
amount of incestuous elegance to it.
I don't know that status of virtual tables, but much of the motivation
for turning the RSB mechanism into a type hierarchy was to support
virtual tables. The mechanism by which triggers are fired for virtual
tables would have to be different from real tables, but with appropriate
and necessary cleverness, use the same underlaying mechanism and certain
the same semantics.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376
>I'm not sure if this is the right forum for this question but IAn interesting idea that I don't think has been explored is defining
>thought I would put it out there. Would it be architectually correct
>and feasable to put a trigger on connection/disconnection to a
>database? It would make user management an almost trivial matter.
>(ie concurrent user license management etc).
>
>
>
triggers on system table -- virtual and real -- and use the existing
trigger mechanism (we've talked about virtual tables, but not in this
context). So, for example, if we had a virtual table of RDB$ATTACHMENTS
(I'd prefer SYSTEM.ATTACHMENTS, but that's a different issue), then
defining the appropriate triggers would give you exactly the information
and "events" that you need.
As for DDL triggers, there isn't any reason (other than easily changed
startup algorithms) that triggers couldn't be defined on system tables.
You must agree that defining a trigger on RDB$TRIGGERS has a certain
amount of incestuous elegance to it.
I don't know that status of virtual tables, but much of the motivation
for turning the RSB mechanism into a type hierarchy was to support
virtual tables. The mechanism by which triggers are fired for virtual
tables would have to be different from real tables, but with appropriate
and necessary cleverness, use the same underlaying mechanism and certain
the same semantics.
--
Jim Starkey
Netfrastructure, Inc.
978 526-1376