Subject | Re: [firebird-support] Temporary disable FK constraint |
---|---|
Author | Helen Borrie |
Post date | 2015-11-06T19:21:13Z |
Hello Scott,
Saturday, November 7, 2015, 4:01:48 AM, you wrote:
it involves system-created triggers as well.
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
Saturday, November 7, 2015, 4:01:48 AM, you wrote:
> I have a feeling that the answer is 'no', but...Constraints and their indexes, no. A constraint isn't just an index,
> In a FB2.5 system is there a way to temporarily disable foreign key
> constraints? i.e. something like 'ALTER INDEX ... INACTIVE'
it involves system-created triggers as well.
> Got a big lump of clean data I want to drop into a table.If "on the fly" means "while users are logged in" that's not safe.
> Alternatively, how safe is dropping/recreating the FKs on the fly?
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