Re: I want the stupidest possible binary export

Поиск
Список
Период
Сортировка
От David Rysdam
Тема Re: I want the stupidest possible binary export
Дата
Msg-id 87ioklrn91.fsf@loud.ll.mit.edu
обсуждение исходный текст
Ответ на Re: I want the stupidest possible binary export  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Adrian Klaver <adrian.klaver@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?

Вложения

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

Предыдущее
От: Jov
Дата:
Сообщение: Re: I want the stupidest possible binary export
Следующее
От: David Rysdam
Дата:
Сообщение: Re: I want the stupidest possible binary export