From: | "Joshua b(dot) Jore" <josh(at)greentechnologist(dot)org> |
---|---|
To: | Rob <rob(at)obsidian(dot)co(dot)za> |
Cc: | pgsql-novice(at)postgresql(dot)org, <postgresql(at)obsidian(dot)co(dot)za> |
Subject: | Re: Referential Integrity |
Date: | 2002-04-15 13:09:26 |
Message-ID: | Pine.BSO.4.40.0204150805460.1225-100000@kitten.greentechnologist.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Temporarily disable the triggers on that table and then re-enable them
afterwards. The trick is to set pg_class.reltriggers = 0 to disable and
then restore it to the correct number of triggers afterward. Play with
pg_restore or search the recent (last month) archives for more on this.
If you give pg_restore enough information it will disable triggers oduring
the load. You'd want to read that for an example of the correct SQL. Also,
I posted last month two functions to disable/enable all non-system
triggers in on swell foop. Look in the archives for that.
Joshua b. Jore
http://www.greentechnologist.org
On Mon, 15 Apr 2002, Rob wrote:
> Hi all,
>
> I've got a column in one of my tables that references another column in
> another table
> i.e. barcode REFERENCES product(barcode)
>
> Is there a way to drop this referential integrity for a while and then
> reinstate it?
>
>
>
> --
> Rob
>
> He who dies with the most toys ...
>
> ... still dies
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (OpenBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE8utEKfexLsowstzcRAhIWAJsEdG0U+xQ86/5uztMGENzVFatWawCeOVm1
wtmltx7CyDrr3kKfGSD5QJM=
=e0nU
-----END PGP SIGNATURE-----
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Woehlke | 2002-04-15 13:11:50 | SQL-Dump and refertial Integrity |
Previous Message | Andrew McMillan | 2002-04-15 09:55:15 | Re: \copy and serial type |