Re: Disable Triggers

From: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Disable Triggers
Date: 2008-02-21 18:39:36
Message-ID: 9a7a0772334cca0dcb465c5dcf158970@biglumber.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


-----BEGIN PGP SIGNED MESSAGE-----
Hash: RIPEMD160

> My questions is this: how would I go about changing my function so
> that all the triggers EXCEPT the Slony trigger would be disabled?
> Any ideas?
..
> PostgreSQL 7.4.19 on i686-redhat-linux-gnu, compiled by GCC gcc (GCC) 3.4.6

This won't help you immediately, but you might want to look at the new
enable replica replica trigger functionality added in 8.3 (thanks Jan!):

http://www.postgresql.org/docs/current/static/sql-altertable.html

Could be more ammo to get you off of that old 7.4 :)

> I have failed to mention that we are disabling all the triggers on
> a given table only done during a transaction; thus, it affects no
> one else.

Be careful: if you are directly manipulating the system tables,
you still run the risk of problems as the system tables are
not completely MVCC safe unless you lock them.

- --
Greg Sabino Mullane greg(at)turnstep(dot)com
PGP Key: 0x14964AC8 200802211338
http://biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8
-----BEGIN PGP SIGNATURE-----

iEYEAREDAAYFAke9xUQACgkQvJuQZxSWSsifbACffN6/ohNCwvkvZ10Uvamyg264
nckAnRarfpLgrZYkLe6Q/FSW+edC2hQC
=9GqX
-----END PGP SIGNATURE-----

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2008-02-21 18:49:52 Re: Mac ordering with locales
Previous Message Terry Lee Tucker 2008-02-21 18:28:29 Re: Disable Triggers