Re: Table transfer

From: "Eric Comeau" <Eric(dot)Comeau(at)signiant(dot)com>
To: <mladen(dot)gogala(at)vmsinfo(dot)com>, "Jorge Alberto Fuentes Casillas" <buen_sama(at)yahoo(dot)com(dot)mx>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Table transfer
Date: 2010-09-23 12:25:02
Message-ID: 35FABCF85D99464FB00BC5123DC2A70A0B57F24E@s228130hz1ew09.apptix-01.savvis.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

PostgreSQL dblink contrib module may be your friend.

http://www.postgresql.org/docs/8.3/static/dblink.html

-----Original Message-----
From: Mladen Gogala [mailto:mladen(dot)gogala(at)vmsinfo(dot)com]
Sent: Wednesday, September 22, 2010 7:40 AM
To: Jorge Alberto Fuentes Casillas
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Table transfer

Jorge Alberto Fuentes Casillas wrote:
> Good day to all of you.
>
> Currently i have 2 databases in my postgresql server, and i want
> to transfer the data from my db1.table1 to my db2.table2.
>
> Both of the tables are very simmilar from each other, so, what i want
> to do, is to transfer mostly of the rows from one table to the other.
> I was wondering if you could please help me on how doing this, what i
> want to know, is if there's something like this:
>
>
> NSERT INTO db1.table_1 (table1_row1,table1_row2,table1_row3,...,...,...,)
>
> FROM db2.table_2 (table2_row1,table2_row2,table2_row3,...,...,...,)
>
>
> I hope this haven't been very confusing, I'll appreciate any kind of
> help that you may provide me. Thousands of thanks in advance.
>
> Greetings.
>
>
You will need a script with 2 connections, one to the source database,
another one to the target database.

--
Mladen Gogala
Sr. Oracle DBA
1500 Broadway
New York, NY 10036
(212) 329-5251
www.vmsinfo.com

In response to

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Rob Richardson 2010-09-23 12:34:35 Re: log options
Previous Message Frank Bax 2010-09-23 10:37:29 log options