Disable trigger with Postgresql 7.4.x?

Hello,

I read in an old thread

http://archives.postgresql.org/pgsql-hackers/2002-08/msg0007 9.php

.... that starting with Postgresql 7.3, there is a new way to disable and
enable triggers in Postgresql. The "old" way was:

update pg_class set reltriggers=3D0 where relname =3D 'YOUR_TABLE_NAME';
update pg_class set reltriggers =3D count(*) from pg_trigger where
pg_class.oid=3Dtgrelid and relname=3D'YOUR_TABLE_NAME';

What is the recommended way of doing that under Postgresql 7.4.x?

Thanks

Philippe Lang

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
philippe.lang [ Di, 24 August 2004 09:41 ] [ ID #453380 ]

Re: Disable trigger with Postgresql 7.4.x?

Philippe Lang wrote:
> Hello,
>
> I read in an old thread
>
> http://archives.postgresql.org/pgsql-hackers/2002-08/msg0007 9.php
>
> ... that starting with Postgresql 7.3, there is a new way to disable and
> enable triggers in Postgresql. The "old" way was:
>
> update pg_class set reltriggers=0 where relname = 'YOUR_TABLE_NAME';
> update pg_class set reltriggers = count(*) from pg_trigger where
> pg_class.oid=tgrelid and relname='YOUR_TABLE_NAME';
>
> What is the recommended way of doing that under Postgresql 7.4.x?

Same. We haven't added a better way yet.

--
Bruce Momjian | http://candle.pha.pa.us
pgman [at] candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo [at] postgresql.org)
pgman [ Di, 24 August 2004 13:20 ] [ ID #453384 ]
Datenbanken » comp.databases.postgresql.sql » Disable trigger with Postgresql 7.4.x?

Vorheriges Thema: refer to computed columns
Nächstes Thema: stored procedures and type of returned result.