Re: deactivating/activating constraint

From: Sebastian Böck <sebastianboeck(at)freenet(dot)de>
To: pgsql-general(at)postgresql(dot)org, evdakov(at)iwk(dot)uka(dot)de
Subject: Re: deactivating/activating constraint
Date: 2005-09-20 14:42:46
Message-ID: 43301FE6.1070802@freenet.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Csaba Nagy 2005-09-20 14:51:06 Re: deactivating/activating constraint
Previous Message Lincoln Yeoh 2005-09-20 14:38:30 Re: Backup and Restore mechanism in Postgres