Re: copy file from a client app to remote postgres isntance
От | Вадим Самохин |
---|---|
Тема | Re: copy file from a client app to remote postgres isntance |
Дата | |
Msg-id | CAGVmuwrtW+jo_EHbVgfoT84cW4ShajtnMgApzv0uYT-NdFxY0w@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: copy file from a client app to remote postgres isntance (Rob Sargent <robjsargent@gmail.com>) |
Ответы |
Re: copy file from a client app to remote postgres isntance
|
Список | pgsql-general |
Well, actually, just ordinary 3 tier architecture. Simple UI connected via restful API with backend written in php, which copies some data in a remote database, that's pretty much it.
пн, 7 нояб. 2022 г. в 20:30, Rob Sargent <robjsargent@gmail.com>:
On 11/7/22 09:57, Вадим Самохин wrote: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\n
and executing it. B
ut 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 по дате отправления: