Re: How to convert ByteA to Large Objects - Mailing list pgsql-general

From Alban Hertroys
Subject Re: How to convert ByteA to Large Objects
Date
Msg-id CAF-3MvOnpdBfdMYWe85Tx0icCzpRM5nQfWyyy-trYsa=n4H=Kw@mail.gmail.com
Whole thread Raw
In response to Re: How to convert ByteA to Large Objects  (Jayadevan M <Jayadevan.Maymala@ibsplc.com>)
List pgsql-general
Caused by: org.postgresql.util.PSQLException: ERROR: column "docdta" is of type bytea but expression is of type oid
  Hint: You will need to rewrite or cast the expression."
 
Looks like that table has a column of type BYTEA, while the code expects it to be a LOB. Perhaps the easiest fix is to change the table to store a LOB instead?
One of the benefits of doing that is that you can "stream" LOB's (you access it like a file; opening, reading, seeking), whereas AFAIK you have to retrieve BYTEA data as a whole before you can start sending it to the client.

pgsql-general by date:

Previous
From: Harald Fuchs
Date:
Subject: Re: PostgreSQL 9.1.0 bug?
Next
From: Thomas Kellerer
Date:
Subject: Re: Problem with the 9.1 one-click installer Windows7 64bit