Search Postgresql Archives

Re: disable triggers using psql

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

 



On Wed, Feb 16, 2011 at 10:08:53AM -0500, David Johnston wrote:
> I may be off-track here but triggers do not enforce referential integrity -
> constraints do.  If you need to disable triggers you can do so via the ALTER
> TABLE command.

Unless something very big changed when I wasn't looking, the
constraints are actually implemented as triggers under the hood.  But
you're right that it'd be cleaner to drop the constraints and re-add
them than to fool with system triggers.

> The reason I think pg_restore works for you is because when a table is built
> using pg_restore all the data is loaded into all tables BEFORE any
> constraints are created.  I believe that if you did a data-only dump from
> pg_dump you would have the same integrity problems.

Yes.

A

-- 
Andrew Sullivan
ajs@xxxxxxxxxxxxxxx

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[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