Received: from localhost (maia-3.hub.org [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 6BD029FB6C2 for ; Wed, 18 Jul 2007 10:36:40 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 53412-01 for ; Wed, 18 Jul 2007 10:36:27 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from qb-out-0506.google.com (qb-out-0506.google.com [72.14.204.224]) by postgresql.org (Postfix) with ESMTP id 637009FB349 for ; Wed, 18 Jul 2007 10:36:35 -0300 (ADT) Received: by qb-out-0506.google.com with SMTP id o12so1666529qba for ; Wed, 18 Jul 2007 06:36:34 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=lvgTS87LqxrDNNa2AvxAYOnFgkdzZUBQrdADgFxBmjf+noTSh/CP3qk033HHPOursPKTqpsOyMAuYjf1+kvACh3erbl9HS66yHqa+UEq/iF3zlsf+nodcXJJ4ZEC6k1mvFzWc9LjbJThEb+l7XE7AfyLnG3778gMb9cvqQmx6U0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=eYvo2/nSCU1q8hAzD+W2soNT9mynhwcYf1Z6xLhEqXfh7cy+AtLRWpS1zipkjt/6JQH5Zsu7N6dZexhRm663a4O6/G5Xrc1tyuKG3ui0riR7HFmZ5pjEBNQc0X4WPdvFVQc5gnNULr8ZQ+Ll+mJk7YSeiWUtosos3dxO2EY0RdU= Received: by 10.114.110.1 with SMTP id i1mr1482876wac.1184765793457; Wed, 18 Jul 2007 06:36:33 -0700 (PDT) Received: by 10.114.174.13 with HTTP; Wed, 18 Jul 2007 06:36:33 -0700 (PDT) Message-ID: Date: Wed, 18 Jul 2007 09:36:33 -0400 From: "Michael Dengler" To: pgsql-performance@postgresql.org Subject: How to use a trigger to write rows to a remote server MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_90288_32674076.1184765793369" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/212 X-Sequence-Number: 25896 ------=_Part_90288_32674076.1184765793369 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All, I am trying to find out how to use a trigger function on a table to copy any inserted row to a remote PG server. ie: Row X is inserted into TableX in DB1 on server1....TableX trigger function fires and contacts DB2 on server2 and inserts the row into TableY on server2. I've looked around and can't see to find this. Essentially I need to know how to write to a remote DB server from within a trigger function. This is not replication, I'm not interested in a full blown trigger based replication solution. Any Help is greatly appreciated! Thanks Mike ------=_Part_90288_32674076.1184765793369 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi All,

I am trying to find out how to use a trigger function on a table to copy any inserted row to a remote PG server.

ie:

Row X is inserted into TableX in DB1 on server1....TableX trigger function fires and contacts DB2 on server2 and inserts the row into TableY on server2.

I've looked around and can't see to find this. Essentially I need to know how to write to a remote DB server from within a trigger function.

This is not replication, I'm not interested in a full blown trigger based replication solution.

Any Help is greatly appreciated!

Thanks

Mike

------=_Part_90288_32674076.1184765793369--