copying data into another database ? (replication) - Mailing list pgsql-admin

From Raul Retamozo
Subject copying data into another database ? (replication)
Date
Msg-id BAY124-W1170B2FC1A6A48A48BAD66B4270@phx.gbl
Whole thread Raw
Responses Re: copying data into another database ? (replication)
List pgsql-admin
 
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@hotmail.com



Consigue el nuevo Windows Live Messenger Pruébalo

pgsql-admin by date:

Previous
From: "Benjamin Krajmalnik"
Date:
Subject: Re: How to tell how long server has been up?
Next
From: Tom Lane
Date:
Subject: Re: 8.2.4 Won't Build 8.1 Functional Indexes