Postgres Remote Database
Posted: Tue Jan 27, 2004 4:43 am
Hi,
I have Two databases names 'MyDb1' and 'MyDb2' in My System.
I have installed Postgres 7.4 with dblink
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.
I am Using MAC OS 10.2
Anybody Got Idea how to do this?
Thanks
[pg_man][/pg_man]
----------------------------------------------
Some Sample Query Using "dblink" is:
select * from dblink('hostaddr=192.168.1.1 dbname=MyDb1 user=pgsql','select username,password,usertype from users') as t1(username varchar,password varchar,usertype varchar);
----------------------------------------------
I have Two databases names 'MyDb1' and 'MyDb2' in My System.
I have installed Postgres 7.4 with dblink
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.
I am Using MAC OS 10.2
Anybody Got Idea how to do this?
Thanks
[pg_man][/pg_man]
----------------------------------------------
Some Sample Query Using "dblink" is:
select * from dblink('hostaddr=192.168.1.1 dbname=MyDb1 user=pgsql','select username,password,usertype from users') as t1(username varchar,password varchar,usertype varchar);
----------------------------------------------