Skip site navigation (1) Skip section navigation (2)

Re: 'dblink' Help

From: Joe Conway <mail(at)joeconway(dot)com>
To: JinNet Picker <netpicker9(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: 'dblink' Help
Date: 2004-01-31 19:38:22
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
JinNet Picker wrote:

> What i need is, when ever a NEW record is inserted in
> 'MyDb1' , i want fire a Trigger or Rule to insert the
> Same Record to MyDb2 database.

> Anybody Got Idea how to do this?

See the dblink documentation for dblink_exec(), and see the Postgres 
documentation for how to create triggers:
You'll probably want to create the trigger function using PL/pgSQL:


In response to

pgsql-admin by date

Next:From: Gaetano MendolaDate: 2004-02-01 01:58:52
Subject: release note missing
Previous:From: Sally SallyDate: 2004-01-31 18:52:06
Subject: Separating a single database into different disks

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group