It still sounds wierd to me that escaping 1mb a couple of times blows up to more than 10mb.
The "broken" check_number function is not used in the new storage class for postgresql. SO this shouldn't be a problem anymore, right? Nico Klasens Finalist IT Group Java Specialists -----Oorspronkelijk bericht----- Van: Kees Jongenburger [mailto:[EMAIL PROTECTED] Verzonden: dinsdag 22 juli 2003 11:57 Aan: [EMAIL PROTECTED] Onderwerp: Re: Postgresql and blobs On Tuesday 22 July 2003 12:35 pm, Nico Klasens wrote: > Retrieving the byte fields from the database will always require a > least the size of the blob, but that does not explain why the bytea > field requires so much memory. because the byte has to be escaped a few times and finaly has to be put in an sql statement. the postgresql driver uses a StringBuffer and the stringbuffer doubles it's capacity every time it grows. So first the byte[] is escaped and put in a StringBuffer than the stringbuffer is inserted in the sql statement (escaped again). One other problem with using blob (iod) is when doing a export/import. because you have to use a special format (tar if i remeber correctely) that does not allow to remove the broken "check_number" function.
