Subject Re: [IB-Architect] How about triggers on SELECTS or any DML plus others.
Author Bill Karwin
Jason Chapman wrote:
>
> I could really do with triggers on selects passsing in the select
> statement as an argument. This would obviously look more like a SP.

Can't you use a stored procedure then?

You can't insert into a stored procedure, but you can insert into the
base table. You can code your applications to insert into the base
table but always select from a select procedure that does the logging
you want.

People can't select from the base table unless you grant them the SQL
privilege to do so. Grant SELECT privilege on the base table only to the
stored procedure itself.

I think triggers on non-DML events would be useful. Login/logout is one
possibility, as well as backup, restore, on a schedule (like cron), on
the first new page allocations in a given secondary file, etc.

Bill Karwin