Subject Re: [firebird-support] Temporary disable FK constraint
Author Helen Borrie
Hello Scott,

Saturday, November 7, 2015, 4:01:48 AM, you wrote:

> I have a feeling that the answer is 'no', but...

> In a FB2.5 system is there a way to temporarily disable foreign key
> constraints? i.e. something like 'ALTER INDEX ... INACTIVE'

Constraints and their indexes, no. A constraint isn't just an index,
it involves system-created triggers as well.

> Got a big lump of clean data I want to drop into a table.

> Alternatively, how safe is dropping/recreating the FKs on the fly?

If "on the fly" means "while users are logged in" that's not safe.
Otherwise it's safe - as long as you remember to reinstate and test
the constraints before allowing user logins.

Still, I'm bemused as to why you want to fiddle with the constraints
if you're not changing them.

Helen