Re: How to insert into another db instance in

From: "Rick Szeto" <rszeto(at)csi(dot)ca>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to insert into another db instance in
Date: 2003-01-06 20:40:40
Message-ID: se19a380.017@mail.tor.csi.ca
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Thank you.
I have tried and confirmed the dblink solution. Since we are already
using 7.3, upgrading was not an issue.

Rick

>>> Richard Huxton <dev(at)archonet(dot)com> 01/06/03 11:59 AM >>>
On Monday 06 Jan 2003 4:06 pm, Rick Szeto wrote:
> Hi,
> I this question seems out of place on the other mailing lists, so
I
> posted here.
>
> Basically, the problem is this:
> I have 2 database instances. InstanceA & InstanceB
> In InstanceA, I have a trigger on a table which, when activated, will
> insert a row into some table in InstaceB.
> The trigger is written in pl/pgsql.
>
> How can this be done?

You probably want to look at the dblink package in contrib/dblink.
Alternatively, you'd have to do it with a daemon application LISTENing
for
messages from your trigger.
Alternatively, you could use schemas in 7.3 to make it look like you
have two
databases.

Option 1 seems to be what you're after. I think 7.3 dblink has had some
reworking, so if you can upgrade first that might be an idea.

--
Richard Huxton

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

Browse pgsql-general by date

  From Date Subject
Next Message Shane McChesney 2003-01-06 20:40:59 Re: [GENERAL] www.postgresql.org
Previous Message Jason Hihn 2003-01-06 20:22:17 Re: [GENERAL] www.postgresql.org