Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / June 2004

Tip: Looking for answers? Try searching our database.

bytea SQL ERROR with size

Thread view: 
lionel pacoud - 11 Jun 2004 09:22 GMT
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).getLargeObjectAPI();

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

well, thanks for your help.
lionel
lionel pacoud - 15 Jun 2004 15:42 GMT
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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.