Re: libpq: COPY FROM STDIN BINARY of arrays

Поиск
Список
Период
Сортировка
От Dominique Devienne
Тема Re: libpq: COPY FROM STDIN BINARY of arrays
Дата
Msg-id CAFCRh-8QhKRT3RTmQ+PzgwwHF6k_8iVNY4veE4eVJTarG0tHBA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: libpq: COPY FROM STDIN BINARY of arrays  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
On Thu, Mar 30, 2023 at 6:00 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
Dominique Devienne <ddevienne@gmail.com> writes:
> Does the wire-format of arrays differ between binary-binds and binary-copy?

No.

An update on this, I think I figure it out, by comparing with COPY TO STDOUT WITH (FORMAT BINARY).
I was missing the byte-count "header" for the array. Since I'm reusing my binary-bind code for COPY,
I'm missing the 4 bytes for the array's "total encoded byte length" before the array data proper.
Now that I understand the issue, should be a simple matter to fix. Thanks for chiming in Tom. --DD

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

Предыдущее
От: Siddharth Jain
Дата:
Сообщение: Question on creating keys on partitioned tables
Следующее
От: Arnaud Lesauvage
Дата:
Сообщение: Cannot terminate backend