Re: Copying data from a CSV file into a table dynamically
В списке pgsql-general по дате отправления:
| От | pavan95 |
|---|---|
| Тема | Re: Copying data from a CSV file into a table dynamically |
| Дата | |
| Msg-id | 1534252253597-0.post@n3.nabble.com обсуждение исходный текст |
| Ответы |
Re: Copying data from a CSV file into a table dynamically
|
| Список | pgsql-general |
Hi all, I am well versed with the COPY command for copying the contents of a csv file into a table. I am used to the below mentioned command: * COPY postgres_log1 FROM '/tmp/abc/xyz/postgresql-2018-08-14_000000.csv' WITH csv;* But in the location "/tmp/abc/xyz/" daily a file(with header postgresql-2018-08-14_000000.csv) will be generated. So how can I automate this task instead of manually specifying the file name, it has to look for the filename with current_date at the time of copying into table. How can I achieve this? Any suggestions or modifications are most welcome. Regards, Pavan -- Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера