Re: I want the stupidest possible binary export
Вложения
В списке pgsql-general по дате отправления:
| От | 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 по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера