Re: deactivating/activating constraint - Mailing list pgsql-general

From Oleg
Subject Re: deactivating/activating constraint
Date
Msg-id 4331127F.1050102@iwk.uka.de
Whole thread Raw
In response to Re: deactivating/activating constraint  (Sebastian Böck <sebastianboeck@freenet.de>)
List 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
>


pgsql-general by date:

Previous
From: aw_contact@inbox.ru
Date:
Subject: pg_index_indrelid_index error, any ideas ??
Next
From: Howard Cole
Date:
Subject: Win32 Backup and Restore of large databases.