Adrian Klaver <adrian.kla...@aklaver.com> 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 where key = 1) to
>      'file'" with binary

OK, good, that works. However, now I have the problem I suspected I
would: I get more than just the bytes that were in my field. 27 bytes
more, to be exact.

I already did -t for tuples-only and I'm only doing one row and column
so there's no separators there. Since it's a .gz file and 'file' no
longer recognizes it, I deduce that the magic cookie isn't at the
beginning of the file anymore and some of the 27 bytes must be at the
beginning of the file instead. 

Is this a PG-specific binary format with a wrapper around my data or
just my data only?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to