Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id 7EEAC2E005E for ; Thu, 3 Apr 2008 14:35:42 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 62282-01-3 for ; Thu, 3 Apr 2008 14:35:36 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from ipmail01.adl6.internode.on.net (ipmail01.adl6.internode.on.net [203.16.214.146]) by developer.postgresql.org (Postfix) with ESMTP id 357BE2E0068 for ; Thu, 3 Apr 2008 14:35:37 -0300 (ADT) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgkFACOy9EfLevdH/2dsb2JhbACBWqoy X-IronPort-AV: E=Sophos;i="4.25,599,1199626200"; d="scan'208";a="75244296" Received: from ppp247-71.static.internode.on.net (HELO DevBox.local) ([203.122.247.71]) by ipmail01.adl6.internode.on.net with ESMTP; 04 Apr 2008 04:05:33 +1030 Message-ID: <47F51563.9060108@Sheeky.Biz> Date: Fri, 04 Apr 2008 04:05:31 +1030 From: Shane Ambler User-Agent: Thunderbird 2.0.0.12 (Macintosh/20080213) MIME-Version: 1.0 To: Marcin Krawczyk CC: pgsql-sql@postgresql.org Subject: Re: connections between servers References: <95f6bf9b0804031000r6c582264j83252541a9fb9da9@mail.gmail.com> In-Reply-To: <95f6bf9b0804031000r6c582264j83252541a9fb9da9@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/23 X-Sequence-Number: 30562 Marcin Krawczyk wrote: > Hi all. I was wondering if it's possible for a trigger to perform operations > on a database on different server? I saw somewhere that there's a piece of > software that allows conneciotns between different databases, but what about > different servers? I also thought about using perl, would it be possible to > connect to different server from within perl trigger? > Thanks in advance. > > regards > mk > Yes it is possible. A PL/Perl trigger is one option you have. dblink (in contrib) and dbi-link, dblink-tds, oralink and odbclink are other options at pgfoundry.org depending on your needs. There was a recent discussion in the general mailing list about this. http://archives.postgresql.org/pgsql-general/2008-03/msg01343.php -- Shane Ambler pgSQL (at) Sheeky (dot) Biz Get Sheeky @ http://Sheeky.Biz