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

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq
Дата
Msg-id 9889.1435014508@sss.pgh.pa.us
обсуждение исходный текст
Ответ на BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq  (socketpair@gmail.com)
Ответы Re: BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq  (Марк Коренберг <socketpair@gmail.com>)
Re: BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq  (Марк Коренберг <socketpair@gmail.com>)
Список pgsql-bugs
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

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

Предыдущее
От: socketpair@gmail.com
Дата:
Сообщение: BUG #13462: Impossible to use COPY FORMAT BINARY in chunks through libpq
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Incomplete Explain for delete