Subject Re: [firebird-support] drop table
Author Paul Vinkenoog
Hi Nick,

> if I try to drop a table that has a before_insert trigger, what
> should happen?
>
> I think I should get an error and the drop would fail but I've just
> had a case where the drop table suceeded and the trigger was
> silently dropped as well, is this correct?

Absolutely. If you drop a table, you close shop on it. Since you
cannot insert into a table that isn't there, there's no need for its
fields, triggers, or constraints.

What makes a table drop fail is if something from outside the table
still refers to it (a foreign key, an SP, an active transaction using
the table...)

> is this a change (I've jumped from IB4 to firebird 1.0.2)

I've never used IB4 but it would surprise me if it forced you to
explicitly drop all the triggers before dropping the table.


Greetings,
Paul Vinkenoog