What is the best way to automatically import CSVs into a remote Postgres server?
I am using a temperature sensor connected to my raspberry Pi to log data (using a python script) into a CSV file:
2013-11-11 23:00:25,27.187
2013-11-11 23:00:31,27.25
2013-11-11 23:00:36,27.25
2013-11-11 23:00:41,27.5
Using the COPY command in psql, I have no problems importing into a table if the CSV file is on the machine running postgres.
How can I import the data directly into a table on my postgres server from my Raspberry Pi?
(In the future, I would like to have my Pi import data autonomously, updating the current table by adding new rows as the Pi logs more data)