Re: copy file from a client app to remote postgres isntance
В списке pgsql-general по дате отправления:
| От | Rob Sargent |
|---|---|
| Тема | Re: copy file from a client app to remote postgres isntance |
| Дата | |
| Msg-id | ad628547-cfd3-20b8-689a-08b869c5b195@gmail.com обсуждение исходный текст |
| Ответ на | copy file from a client app to remote postgres isntance (Вадим Самохин <samokhinvadim@gmail.com>) |
| Ответы |
Re: copy file from a client app to remote postgres isntance
|
| Список | pgsql-general |
There are bulk copy routines available. What is your architecture?Hi all,I have an application that must copy a local file in csv format to a postgres table on a remote host. The closest solution is this one (https://stackoverflow.com/a/9327519/618020). It boils down to specifying a \copy meta-command in a psql command:psql -U %s -p %s -d %s -f - <<EOT\n here hoes a \copy meta-command \nEOT\nand executing it. But it's quite an unnatural way to write database code. Has anything changed in the last ten years? Or, is there a better way to copy file contents in a remote database?
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера