Getting "insufficient data left in message" on copy with binary

Поиск
Список
Период
Сортировка
От Gordon Shannon
Тема Getting "insufficient data left in message" on copy with binary
Дата
Msg-id 25282935.post@talk.nabble.com
обсуждение исходный текст
Ответы Re: Getting "insufficient data left in message" on copy with binary  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hello,

I'm running 8.4 on Linux/Centos.  I am doing a "copy (select ....) to
'/absolute/path/to/file.dat' with binary". That works fine.  But when I load
that file into a table...

  copy mytable (id, mlid, parent_mlid, author_id, date_id, time_id,
content_type_id, provider_id,
    is_duplicate, is_spam, language_code, profanity, tonality, sentiment,
created_time, updated_at)
  from '/absolute/path/to/file.dat' with binary;

  ERROR:  insufficient data left in message
  CONTEXT:  COPY mytable, line 1, column provider_id

The same data works fine without the "with binary".  Also, the column it's
complaining about, provider_id, is a NOT NULL column, and the data is
definitely there -- i.e. not a NULL in data file.

I have searched for this message and mostly I see issues related to JDBC
drivers, so that doesn't appear relevant.  And they all talk about nul bytes
(0x00), but again, how can that be relevant when I'm in binary mode?  Seems
like it should understand null bytes here, if that's what this is about.

Anybody seen this?

Thanks,
Gordon

--
View this message in context:
http://www.nabble.com/Getting-%22insufficient-data-left-in-message%22-on-copy-with-binary-tp25282935p25282935.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Josef Wolf
Дата:
Сообщение: Re: pg_ctl with unix domain socket?
Следующее
От: Adam Rich
Дата:
Сообщение: New server disk setup?