Re: How to use a trigger to write rows to a remote server

From: Erik Jones <erik(at)myemma(dot)com>
To: Michael Dengler <michael(dot)dengler(at)gmail(dot)com>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org
Subject: Re: How to use a trigger to write rows to a remote server
Date: 2007-07-18 17:06:34
Message-ID: AC99D16D-3B40-4988-BB69-50087CCCFABF@myemma.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


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
> from one table inserted into another servers DB I don't see it as
> replication because:
>
> a) The destination table will have a trigger that modifies the
> arriving data to fit its table scheme.
> b) It is not critical that the data be synchronous (ie a lost row
> 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
> REPLICATION OF DATA.
>
> Essentially the remote server just wants to know when some record
> arrives at the source server and wants to know some of the info
> contained in the new record.
>
> And yes it may be that I know little about the myriad of problems
> involved with replication...but I do know how to carry on a civil,
> 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
db then you can use dblink or an untrusted version of one of the
available procedural languages such as plperlu or plpythonu.

Erik Jones

Software Developer | Emma®
erik(at)myemma(dot)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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Steven Flatt 2007-07-18 17:08:30 When/if to Reindex
Previous Message Michael Dengler 2007-07-18 16:30:56 Re: How to use a trigger to write rows to a remote server