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

From: "Michael Dengler" <michael(dot)dengler(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: How to use a trigger to write rows to a remote server
Date: 2007-07-18 13:36:33
Message-ID: e8733d090707180636q45bb5d16vff3e79c2d60d2e83@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Heikki Linnakangas 2007-07-18 13:46:05 Re: How to use a trigger to write rows to a remote server
Previous Message Michael Stone 2007-07-18 11:32:50 Re: insert vs select into performance