Обсуждение: automating csv import

Поиск
Список
Период
Сортировка

automating csv import

От
"walker1145"
Дата:
I get a dump of some data in a CSV file and am able to import it
manually using psql and \COPY without a problem. However I now need to
automate this as  it will need to be done every 2 hours 24/7. I've tried
looking through the archives and nothing seems to touch upon this
completely and the documentation doesn't mention this or if it does it
seems to be some what obscure (at least to me). Does anyone have any
suggestions?


Re: automating csv import

От
John Sidney-Woollett
Дата:
Have you tried creating a script to do the import operation, and then
scheduling it to run periodically using cron (on unix) or at (on windows)?

Seems like that is all you need to do...

John Sidney-Woollett

walker1145 wrote:

> I get a dump of some data in a CSV file and am able to import it
> manually using psql and \COPY without a problem. However I now need to
> automate this as  it will need to be done every 2 hours 24/7. I've tried
> looking through the archives and nothing seems to touch upon this
> completely and the documentation doesn't mention this or if it does it
> seems to be some what obscure (at least to me). Does anyone have any
> suggestions?
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>    (send "unregister YourEmailAddressHere" to majordomo@postgresql.org)