Insert binary file into bytea where PG server does not have access to the file ?

Поиск
Список
Период
Сортировка
От David Gauthier
Тема Insert binary file into bytea where PG server does not have access to the file ?
Дата
Msg-id CAMBRECChKQYW-8COeNiMt09dJcX9YqHc9rmVMuTQtg-=iZ2sBg@mail.gmail.com
обсуждение исходный текст
Ответы Re: Insert binary file into bytea where PG server does not have access to the file ?  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
11.5 on linux

Big corp with an IT dept providing us with PG DBs running in instances on their servers. (We/I amd not DBA).    We on the client side, the "users" of these DBs, want to load binary files into bytea type columns.  But the files we want to load are on disks that the server does not have access to.  

I googled around for a solution.  This failed...

insert into test_bytea (id,data) values (1,pg_read_binary_file('/top/next.whatever/xyz.bin')::bytea);

ERROR:  could not stat file "/top/next.whatever/xyz.bin": No such file or directory

Understandable because the server hasn't even mounted /top.

Is there a way to do what I want from the client side ?  
If the file is transformed into some titanic string on the client side, then passed along over the net to the server in the insert statement, is there a max string length that I need to worry about ?

Thanks

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

Предыдущее
От: Achilleas Mantzios
Дата:
Сообщение: Re: Require details that how to find user creation date in postgresql Database
Следующее
От: Daniel Frey
Дата:
Сообщение: Re: libpq: Which functions may hang due to network issues?