Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 16C391337B80 for ; Tue, 8 Feb 2011 08:30:34 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 52454-07 for ; Tue, 8 Feb 2011 12:30:26 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id 313161337B47 for ; Tue, 8 Feb 2011 08:30:26 -0400 (AST) Received: from 121-98-80-66.bitstream.orcon.net.nz ([121.98.80.66] helo=[192.168.1.2]) by tremor.opencloud.co.nz with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1Pmmi6-0006tA-ME; Wed, 09 Feb 2011 01:30:22 +1300 Message-ID: <4D513759.8010506@opencloud.com> Date: Wed, 09 Feb 2011 01:30:17 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.24 (Windows/20100228) MIME-Version: 1.0 To: Andreas Joseph Krogh CC: pgsql-jdbc@postgresql.org Subject: Re: ResultSet.getClob() causing problems when used with JPA's @Lob References: <23828143.70.1297164859086.JavaMail.on@prod2> In-Reply-To: <23828143.70.1297164859086.JavaMail.on@prod2> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201102/43 X-Sequence-Number: 21441 Andreas Joseph Krogh wrote: > I hear over and over that PGs JDBC-driver wants to map CLOBs to OIDs but there really doesn't seem to be any good reasons for it It's mostly there for historical reasons - IIRC it dates back to the early 7.x days when you *had* to use LOs to store large data, because there was no such thing as the "text" or "bytea" type. There's really not much reason to use it in new code these days, as I said. But there's also not much reason to arbitrarily break compatibility with existing code that assumes the current behavior, just for the sake of your particular application. I think that your efforts here might be more productively directed towards improving the Hibernate postgresql implementation so that it avoids using get/setClob() entirely. Oliver