Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id B6BE19FB638 for ; Wed, 18 Jul 2007 14:06:44 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 89078-01 for ; Wed, 18 Jul 2007 14:06:33 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from smtp120.iad.emailsrvr.com (smtp120.iad.emailsrvr.com [207.97.245.120]) by postgresql.org (Postfix) with ESMTP id D024B9FB61E for ; Wed, 18 Jul 2007 14:06:40 -0300 (ADT) Received: by relay2.r2.iad.emailsrvr.com (Authenticated sender: erik-AT-myemma.com) with ESMTP id 4BF5244FB34; Wed, 18 Jul 2007 13:06:39 -0400 (EDT) In-Reply-To: References: <18352.1184770316@sss.pgh.pa.us> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: Cc: "Tom Lane" , pgsql-performance@postgresql.org Content-Transfer-Encoding: quoted-printable From: Erik Jones Subject: Re: How to use a trigger to write rows to a remote server Date: Wed, 18 Jul 2007 12:06:34 -0500 To: Michael Dengler X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/221 X-Sequence-Number: 25905 On Jul 18, 2007, at 11:30 AM, Michael Dengler wrote: > Hmm..I was hoping to avoid personal insults.... > > Anyway, Nuts or not...what I am attempting is to simply have row =20 > from one table inserted into another servers DB I don't see it as =20 > replication because: > > a) The destination table will have a trigger that modifies the =20 > arriving data to fit its table scheme. > b) It is not critical that the data be synchronous (ie a lost row =20 > on the destination DB is not a big deal) > c) I see as more of a provision of data to the destination DB NOT A =20= > REPLICATION OF DATA. > > Essentially the remote server just wants to know when some record =20 > arrives at the source server and wants to know some of the info =20 > contained in the new record. > > And yes it may be that I know little about the myriad of problems =20 > involved with replication...but I do know how to carry on a civil, =20 > adult conversation....maybe we can have a knowledge exchange. > > Cheers > > Mike Mike, If all you need is for your trigger to make a simple query on another =20= db then you can use dblink or an untrusted version of one of the =20 available procedural languages such as plperlu or plpythonu. Erik Jones Software Developer | Emma=AE erik@myemma.com 800.595.4401 or 615.292.5888 615.292.0777 (fax) Emma helps organizations everywhere communicate & market in style. Visit us online at http://www.myemma.com