appending from table to table - Mailing list pgsql-general

From Johnson, Shaunn
Subject appending from table to table
Date
Msg-id 73309C2FDD95D11192E60008C7B1D5BB0452E026@snt452.corp.bcbsm.com
Whole thread Raw
List pgsql-general
Howdy :
 
I'm running Postgres 7.1.3 on RedHat Linux 7.2 kernel version 2.4.7 rel 10.  
(I'm on a roll today with the questions, right?) 
 
Say I have a table.  On a monthly basis, someone exports from MS Access a new table
but the contents needs to be appended into the pre-existing table (call it orig_table).
 
I'm trying to develop an automated means to do this, but the best I could come up with is:
 
* run a cron job to dump the new table into a flat file
*modify the flat file - insert a line that says '\copy orig_table from <name_of_file>'
* run a job that wakes up and `psql -U <user> -d <database> -f ./<name_of_file> `
*verify the orig_table (maybe get a count of new records; before / after; something).
 
Is there an easier way to do this?
 
Thanks!
 
-X

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: check sql progress
Next
From: "Johnson, Shaunn"
Date:
Subject: Re: check sql progress