Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea

Поиск
Список
Период
Сортировка
От David G. Johnston
Тема Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea
Дата
Msg-id CAKFQuwb4T5n+ayPZ1S-nwE1VEF_dysgPXxwg_7EuFtHSwq7-ZQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea  ("peter.penzov" <peter.penzov@gmail.com>)
Список pgsql-jdbc
On Saturday, May 7, 2016, peter.penzov <peter.penzov@gmail.com> wrote:
Did you managed to successfully implement similar code? Can you give some
advice how to fix it?


This is not self-contained so advice is hard to give.

I would suggest removing the extraneous stuff, like http, and getting the basic SQL to work reliably in a pure jdbc/Java main (or junit...) program first.

The oid error implies large object usage which is not jdbc compatible.  Either make the column bytea or learn how to use the PostgreSQL driver's large object API.  I'm guessing a bit here because, as I said, your example is lacking detail.  I've had no issues with bytea though I haven't made use of streams.

David J. 

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

Предыдущее
От: "peter.penzov"
Дата:
Сообщение: Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea
Следующее
От: "peter.penzov"
Дата:
Сообщение: Re: org.postgresql.util.PSQLException: ERROR: column "file" is oftype oid but expression is of type bytea