Jov writes:
> psql can only input/output text string,which can not be binary content。with
> 9.2,you can encode bytea to base64,save to file,then use shell command to
> decode the file。
This worked, btw. Encoded to base64, piped to sed to fix the newlines,
piped to 'base64 -id' and then to file.
-09-18 16:55 (GMT+01:00) Till: David Rysdam
,pgsql-general
Rubrik: Re: [GENERAL] I want the stupidest possible binary export
psql can only input/output text string,which can not be binary
content。with 9.2,you can encode bytea to base64,save to file,then use shell
command to decode the file
Jov writes:
> psql can only input/output text string,which can not be binary content。with
> 9.2,you can encode bytea to base64,save to file,then use shell command to
> decode the file。
> google “amutu.com pg bytea” can get a blog post。
I wondered if I could do that. OK, will try it, thanks.
smi
Adrian Klaver writes:
>> psql -t -c "\copy (select mybinaryfield from mytable where key = 1) to
>> 'file'" with format binary
>
> From here:
>
> http://www.postgresql.org/docs/9.2/static/app-psql.html
>
> the above should be:
>
> psql -t -c "\copy (select mybinaryfield from mytable wher
psql can only input/output text string,which can not be binary content。with
9.2,you can encode bytea to base64,save to file,then use shell command to
decode the file。
google “amutu.com pg bytea” can get a blog post。
with upcoming 9.4,you can change bytea to large object,then use lo_* psql
cmd save
On 09/18/2014 07:06 AM, David Rysdam wrote:
I've got a some tables with bytea fields that I want to export only the
binary data to files. (Each field has a gzipped data file.)
I really want to avoid adding overhead to my project by writing a
special program to do this, so I'm trying to do it fro
On 18 September 2014 16:06, David Rysdam wrote:
> I've got a some tables with bytea fields that I want to export only the
> binary data to files. (Each field has a gzipped data file.)
>
> I really want to avoid adding overhead to my project by writing a
> special program to do this, so I'm trying