X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 1B118D1B8AC for ; Mon, 1 Sep 2003 18:02:02 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 62111-07 for ; Mon, 1 Sep 2003 15:01:32 -0300 (ADT) Received: from jengate.thur.de (jengate.thur.de [217.17.193.190]) by svr1.postgresql.org (Postfix) with ESMTP id 5D228D1B574 for ; Mon, 1 Sep 2003 15:01:30 -0300 (ADT) Received: from jengate.thur.de (localhost [127.0.0.1]) by jengate.thur.de (8.12.9/8.12.9) with ESMTP id h81I0Kwh021826 for ; Mon, 1 Sep 2003 20:00:20 +0200 Received: from nibiru.UUCP (uucp@localhost) by jengate.thur.de (8.12.9/8.12.6/Submit) with bsmtp id h81I0JCE021825 for pgsql-sql@postgresql.org; Mon, 1 Sep 2003 20:00:19 +0200 Received: (from weigelt@localhost) by metux.de (8.12.6/8.12.7) id h81Hv4no014279 for pgsql-sql@postgresql.org; Mon, 1 Sep 2003 19:57:04 +0200 Date: Mon, 1 Sep 2003 19:57:04 +0200 From: weigelt@metux.de To: pgsql-sql@postgresql.org Subject: Re: disabling triggers Message-ID: <20030901175704.GA12947@metux.de> References: <1164.219.65.230.103.1055871254.squirrel@mail.trade-india.com> <200306171131.24578.josh@agliodbs.com> <1182.219.65.230.103.1055875666.squirrel@mail.trade-india.com> <200306171149.44425.josh@agliodbs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200306171149.44425.josh@agliodbs.com> User-Agent: Mutt/1.3.27i X-Message-Flag: Wer Outlook verwendet handelt unverantwortlich und grob fahrlaessig! Verwenden Sie _unbedingt_ einen anderen Mailclient! X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200309/1 X-Sequence-Number: 14979 On Tue, Jun 17, 2003 at 11:49:44AM -0700, Josh Berkus wrote: I also need something like that for my replication stuff: When data from another node comes it, it should be written directly to the tables, without any (unwanted) triggers firering. On the other hand, in "normal" mode, also some missing fields should be filled on create or update. Perhaps some more details: All tables have this layout: inode_id int4 attr char mtime timestamp ... On INSERT an missing (NULL) inode_id should be taken from sequence _inode_seq, attr can be set to an default value (currently not important) and an NULL mtime should be replaced by current_timestamp(). When UPDATE-ing, the mtime should also be set to current_timestamp() if not given. But in the "raw" mode (when data from neighbours come in), the mtime field may _not_ be touched (since it would produce an loop!). Currently this is done by the middleware, but I'd like to have it directly in the RDBMS. How could this be solved ? regards -- --------------------------------------------------------------------- Enrico Weigelt == metux IT services phone: +49 36207 519931 www: http://www.metux.de/ fax: +49 36207 519932 email: contact@metux.de cellphone: +49 174 7066481 --------------------------------------------------------------------- Diese Mail wurde mit UUCP versandt. http://www.metux.de/uucp/