pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedDisable trigger with Postgresql 7.4.x?
2+ messages / 2 participants
[nested] [flat]
* Disable trigger with Postgresql 7.4.x?
@ 2004-08-24 07:41 Philippe Lang <philippe.lang@attiksystem.ch>
0 siblings, 1 reply; 2+ messages in thread
From: Philippe Lang @ 2004-08-24 07:41 UTC (permalink / raw)
To: pgsql-sql
Hello,
I read in an old thread
http://archives.postgresql.org/pgsql-hackers/2002-08/msg00079.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?
Thanks
Philippe Lang
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Disable trigger with Postgresql 7.4.x?
@ 2004-08-24 11:20 Bruce Momjian <pgman@candle.pha.pa.us>
parent: Philippe Lang <philippe.lang@attiksystem.ch>
0 siblings, 0 replies; 2+ messages in thread
From: Bruce Momjian @ 2004-08-24 11:20 UTC (permalink / raw)
To: Philippe Lang <philippe.lang@attiksystem.ch>; +Cc: pgsql-sql
Philippe Lang wrote:
> Hello,
>
> I read in an old thread
>
> http://archives.postgresql.org/pgsql-hackers/2002-08/msg00079.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@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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2004-08-24 11:20 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-08-24 07:41 Disable trigger with Postgresql 7.4.x? Philippe Lang <philippe.lang@attiksystem.ch>
2004-08-24 11:20 ` Bruce Momjian <pgman@candle.pha.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox