Re: copying data into another database ? (replication)

From: "Igor Neyman" <ineyman(at)perceptron(dot)com>
To: "Raul Retamozo" <revelar(at)hotmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: copying data into another database ? (replication)
Date: 2007-06-07 12:33:12
Message-ID: F4C27E77F7A33E4CA98C19A9DC6722A201F77006@EXCHANGE.corp.perceptron.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Look up dblink(...) function in PG documentation:

http://search.postgresql.org/search?u=%2Fdocs%2F8.2%2Fstatic%2F&q=dblink

Igor Neyman

________________________________

From: pgsql-admin-owner(at)postgresql(dot)org [mailto:pgsql-admin-owner(at)postgresql(dot)org] On Behalf Of Raul Retamozo
Sent: Wednesday, June 06, 2007 7:09 PM
To: pgsql-admin(at)postgresql(dot)org
Subject: [ADMIN] copying data into another database ? (replication)


Hi everyone on the list.
I've been trying to get a way to copy a postgresql table or some columns from table into another one, but this new table must be in another databse and, also, could be in another server. I was working on a jdbc app , which run well when the destiny table was in the same database than the source ( it was with "create table as select ... into)"), really easy, but we have the other case.

I feel it could be possible writing a function , which receives some variables ( postgresql server, db and table, sql query for filtering data). The problem is that I cant find any example about the following:

-- connecting to a server within the function.
-- retrieve data form this server ( I think some cursors would be useful to save each column, and run by the rows)
-- connecting to another server, und create a table (with a name provided by user), where I can insert data from cursors.

I think it could be answered by replication (Slony ? ), but I have to do it without any other tool.

Does anyone knows If it's possible, and how to do it?

thanks in advance.

raul n. retamozo velarde
revelar(at)hotmail(dot)com

________________________________

Consigue el nuevo Windows Live Messenger Pruébalo <http://get.live.com/messenger/overview>

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2007-06-07 13:55:59 Re: warm standby database on 8.0.4
Previous Message Ali, Luqman 2007-06-07 11:29:53 warm standby database on 8.0.4