Search Postgresql Archives

Re: deactivating/activating constraint

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux