X-Original-To: pgsql-sql@postgresql.org Received: from candle.pha.pa.us (candle.pha.pa.us [207.106.42.251]) by svr1.postgresql.org (Postfix) with ESMTP id 1D78D5E47B2 for ; Tue, 24 Aug 2004 08:20:46 -0300 (ADT) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.11.6) id i7OBKdt25114; Tue, 24 Aug 2004 07:20:39 -0400 (EDT) From: Bruce Momjian Message-Id: <200408241120.i7OBKdt25114@candle.pha.pa.us> Subject: Re: Disable trigger with Postgresql 7.4.x? In-Reply-To: <6C0CF58A187DA5479245E0830AF84F420803D3@poweredge.attiksystem.ch> To: Philippe Lang Date: Tue, 24 Aug 2004 07:20:39 -0400 (EDT) Cc: pgsql-sql@postgresql.org X-Mailer: ELM [version 2.4ME+ PL108 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200408/254 X-Sequence-Number: 18751 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