Problems copying data to different database

From: "Ramakrishna Reddy" <ramakrishna(dot)reddy(at)indussoft(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: Problems copying data to different database
Date: 2006-06-07 10:36:26
Message-ID: CA5E157F5EFE1C4D9CCC5272E67F8781084AE3@rsi-che-mail01.induschennai.rsystems.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

My requirement is to archive records from main DB to the archive DB after certain period. Using Dblink facility, I'm able to perform any kind of activity on the archive DB, except copying from Table of MainDb to a Table of ArchiveDb. Is it possible to move the selective records using following kind of query:

select dblink_exec ('dbname = ArchiveDb', 'insert into Archive_Table select * from To_Be_Archived_Table')

Request your suggestions to achieve this.

Thanks,
RamaKrishna.

Browse pgsql-general by date

  From Date Subject
Next Message Jonathon McKitrick 2006-06-07 10:45:26 Problem with 'postgres' db with 8.0 on a MacBook
Previous Message Martijn van Oosterhout 2006-06-07 10:24:33 Re: Data about rate of downloads