Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea - Mailing list pgsql-jdbc

From David G. Johnston
Subject Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea
Date
Msg-id CAKFQuwb4T5n+ayPZ1S-nwE1VEF_dysgPXxwg_7EuFtHSwq7-ZQ@mail.gmail.com
Whole thread Raw
In response to Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea  ("peter.penzov" <peter.penzov@gmail.com>)
List 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 by date:

Previous
From: "peter.penzov"
Date:
Subject: Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea
Next
From: "peter.penzov"
Date:
Subject: Re: org.postgresql.util.PSQLException: ERROR: column "file" is oftype oid but expression is of type bytea