On Thu, Feb 18, 2016 at 7:42 PM, CS DBA <cs_...@consistentstate.com> wrote:

>
> http://www.postgresql.org/message-id/AANLkTi=2darhqprgtxmcx0aus9mahq2sfxxbvihtu...@mail.gmail.com
>
> Short answer, to avoid the binary blob problem, is to encode the binary
> data, export it, then decode it.
>
> This can be done is psql.  If your client can handle binary directly (e.g,
> JDBC/Java) you can use that language's facilities to perform the
> binary transfer directly thus bypassing the need to transcode.
>
> Can it be done from a Linux shell script?  Any examples? Seems to be
> little info on this in my googling?
>

​Others may provide actual examples but at the moment I don't have the time
to explore to that depth.

To answer your "shell script" question...anything can be done in a shell
script - as long as you have the right programs on your system to do the
actual work.  I already mentioned "psql" which, if you want the least
amount of pure "coding", is going to be the helper program you will want to
use.  And its usage is well documented.  I would suggest base64 encoding
and then using whatever standard base64 decoder program exists on your
Linux box to perform the decoding.

David J.
​

Reply via email to