Re: [ADMIN] How to load data in psql DB

Поиск
Список
Период
Сортировка
От Samed YILDIRIM
Тема Re: [ADMIN] How to load data in psql DB
Дата
Msg-id 948971496225599@web2j.yandex.ru
обсуждение исходный текст
Ответ на Re: [ADMIN] How to load data in psql DB  (Ashwani Kumar B <ashwani.b.kumar@ericsson.com>)
Список pgsql-admin
Hi Ashwani,
 
You can use COPY command and psql to load CSV file to PostgreSQL.
 
\copy zip_codes FROM '/path/to/csv/ZIP_CODES.txt' DELIMITER ',' CSV
 
If you create a simple cronjob, it will periodically load your datas from CSV.
 
https://stackoverflow.com/questions/2987433/how-to-import-csv-file-data-into-a-postgresql-table
 
Best regards.
 
 


İyi çalışmalar.
Samed YILDIRIM



31.05.2017, 10:57, "Ashwani Kumar B" <ashwani.b.kumar@ericsson.com>:

Hi

 

It will be helpful if you share  any sample script which works in crontab and also sample of control file.

 

Regards

Ashwani

 

From: pgsql-admin-owner@postgresql.org [mailto:pgsql-admin-owner@postgresql.org] On Behalf Of Arnaud Gambonnet
Sent: Wednesday, May 31, 2017 1:03 PM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] How to load data in psql DB

 

Hi,

 

pgloader should fit your need.

 

 

Regards,

AG.

 

2017-05-31 8:30 GMT+02:00 Ashwani Kumar B <ashwani.b.kumar@ericsson.com>:

Hi

 

My requirement is to automatically load data which is in CSV format to psql DB table.

 

Normally in oracle I use to do it through sql-loader [sqlldr] . Do we have anything similar in psql.

 

Regards

Ashwani

 

В списке pgsql-admin по дате отправления:

Предыдущее
От: Ashwani Kumar B
Дата:
Сообщение: Re: [ADMIN] How to load data in psql DB
Следующее
От: Mahesh Jhala
Дата:
Сообщение: [ADMIN] Can manual vacuuming conflict with auto vacuuming?