Re: BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq

Поиск
Список
Период
Сортировка
От Марк Коренберг
Тема Re: BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq
Дата
Msg-id CAEmTpZFKDskNxancXsKpvpmte3cM0ObLp8HtLf7cehfaJFzGpw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Thanks, but still not works.... How to debug ? strace:

sendto(3,
"d\0\0\0\27PGCOPY\n\377\r\n\0\0\0\0\0\0\0\0\0d\0\0\0\26\0\2\0\0\0\4\4\3\2\1\0\0\0\4\10\7\6\5d\0\0\0\6\377\377X\0\0\0\4",
59, MSG_NOSIGNAL, NULL, 0) = 59

2015-06-23 4:08 GMT+05:00 Tom Lane <tgl@sss.pgh.pa.us>:
> socketpair@gmail.com writes:
>> If I use PQputCopyData() to pass parts of the binary protocol (as documented
>> in http://www.postgresql.org/docs/9.3/static/sql-copy.html ), postgres
>> binary socket data gets corrupted (i.e. protocol is broken).
>
> I think your test program is buggy; specifically, it doesn't appear to
> have any provision for dealing with data endianness, which means it
> will not work on a little-endian machine.  Per the COPY binary format
> spec:
>
>         Headers and data are in network byte order.
>
>
>                         regards, tom lane



--
Segmentation fault



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

Предыдущее
От: Peter Eisentraut
Дата:
Сообщение: Re: BUG #13440: unaccent does not remove all diacritics
Следующее
От: Марк Коренберг
Дата:
Сообщение: Re: BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq