Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 8980410E9004 for ; Sun, 8 Jan 2012 14:49:47 -0400 (AST) Received: from lo.gmane.org ([80.91.229.12]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RjxoQ-00044C-Ct for pgsql-general@postgresql.org; Sun, 08 Jan 2012 18:49:47 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RjxoB-0005rU-Hl for pgsql-general@postgresql.org; Sun, 08 Jan 2012 19:49:31 +0100 Received: from host-188-174-152-164.customer.m-online.net ([188.174.152.164]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Jan 2012 19:49:31 +0100 Received: from spam_eater by host-188-174-152-164.customer.m-online.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 08 Jan 2012 19:49:31 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-general@postgresql.org From: Thomas Kellerer Subject: Re: Binary Large Objects (LOB/BLOB) in Hibernate and JDBC: Unresolved issues Date: Sun, 08 Jan 2012 19:50:12 +0100 Lines: 20 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: host-188-174-152-164.customer.m-online.net User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.5.666 In-Reply-To: X-Pg-Spam-Score: -4.2 (----) X-Archive-Number: 201201/155 X-Sequence-Number: 183809 Stefan Keller wrote on 08.01.2012 19:13: >> I think you are better off using bytea unless you need to access only parts >> of the blob regularly. > > That's a valid tip. But it's to the current JDBC implementation to > take action because it currently leads to disk space leakage when > using JDBC and JPA/Hibernate. But only if you use large objects. From my perspective bytea is the (only) data type that matches the JDBC BLOB type. And none of the problems you have occur when using bytea. There is no match for PG's large objects in the JDBC API so I don't see your claim that it's a fault of the driver. What's the reason for you to stick with LargeObjects?