appending from table to table

Поиск
Список
Период
Сортировка
От Johnson, Shaunn
Тема appending from table to table
Дата
Msg-id 73309C2FDD95D11192E60008C7B1D5BB0452E026@snt452.corp.bcbsm.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: check sql progress
Следующее
От: "Johnson, Shaunn"
Дата:
Сообщение: Re: check sql progress