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

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "peter(dot)penzov" <peter(dot)penzov(at)gmail(dot)com>
Cc: "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea
Date: 2016-05-07 19:10:01
Message-ID: CAKFQuwb4T5n+ayPZ1S-nwE1VEF_dysgPXxwg_7EuFtHSwq7-ZQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Saturday, May 7, 2016, peter.penzov <peter(dot)penzov(at)gmail(dot)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.

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Christian Ullrich 2016-05-09 17:03:20 Re: Support waffle>1.7.4
Previous Message peter.penzov 2016-05-07 18:46:13 Re: org.postgresql.util.PSQLException: ERROR: column "file" is of type oid but expression is of type bytea