Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 11:27 PM
lionel pacoud
Guest
 
Posts: n/a
Default bytea SQL ERROR with size

Hi,

ok, so I have pictures that I store in Postgres (7.2.4) via JDBC.
if the size of my picture is small (less than 1ko) it's ok, there is
no pb.
but I never succed to put a bigger picture.
the response is :
java.sql.SQLException: ERROR: index_formtuple: data takes 211980
bytes, max is 8191... or
java.sql.SQLException: ERROR: btree: index item size 2768 exceeds
maximum 2713...

it depends of the size of the picture...

I tried to use Large Object instead of bytea but, there is a
ClassCastException when I do this :
LargeObjectManager lobj =
((org.postgresql.Connection)conn).getLargeObjectAP I();

Conclusion, I really need help. I don't see any solutions.

well, thanks for your help.
lionel
  #2  
Old July 19th, 2005, 11:27 PM
lionel pacoud
Guest
 
Posts: n/a
Default Re: bytea SQL ERROR with size

Ok,
so i found a solultion (maybe it could help someone else):
it seems that postgres doesn't accept unique constraint on bytea of
size bigger than 1ko
if I remove the unique constraint, it's OK.
 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles