Subject Re: [firebird-support] Temporary disable FK constraint
Author Rik van Kekem
Scott Morgan blumf@... [firebird-support] wrote:
> You can't inactivate a FK constraint:
>
> SQL> ALTER INDEX FK_FOO INACTIVE;
>
> unsuccessful metadata update
> -MODIFY RDB$INDICES failed
> -action cancelled by trigger (2) to preserve data integrity
> -Cannot deactivate index used by an integrity constraint

O, wow. And even deactivating the trigger/PK doesn't work with that.
I didn't expect that.

You could drop the constraint but would need to recreate it afterwards.

ALTER TABLE FOO_TABLE DROP FK_FOO;

But I agree, it's not very convenient.
Deactivating would be so much simpler.

Grtz,
Rik