Re: deactivating/activating constraint

From: Oleg <evdakov(at)iwk(dot)uka(dot)de>
To: Sebastian Böck <sebastianboeck(at)freenet(dot)de>, pgsql-general(at)postgresql(dot)org, nagy(at)ecircle-ag(dot)com
Subject: Re: deactivating/activating constraint
Date: 2005-09-21 07:57:51
Message-ID: 4331127F.1050102@iwk.uka.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you very much. With DEFERRABLE INITIALLY DEFERRED (at the end of
the constraint) it works fine now

Sebastian Böck schrieb:

> Oleg wrote:
>
>> Dear All,
>> is it possible to temporary deactivate a constraint in PostgreSQL?
>> There is a constraint that does not allow me to write some data (see
>> e-mail below). But after all datasets are written the constraint is
>> valid. So I was wondering wether it is possible to deactivate a
>> constraint write all records in all tables then activate constraint
>> again. Somebody told me that it is possible in Oracle.
>> Thanks a lot in advance
>> Oleg
>
>
> Have you tried to make the Foreign Key deferrable and initially deferred?
>
> See:
> http://www.postgresql.org/docs/8.0/interactive/sql-createtable.html
>
> HTH
>
> Sebastian
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Howard Cole 2005-09-21 11:24:00 Win32 Backup and Restore of large databases.
Previous Message aw_contact 2005-09-21 06:57:58 pg_index_indrelid_index error, any ideas ??