Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id 09A601337B54 for ; Tue, 8 Feb 2011 10:32:46 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 03771-10 for ; Tue, 8 Feb 2011 14:32:40 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from prod2.officenet.no (unknown [195.159.87.248]) by mail.postgresql.org (Postfix) with ESMTP id 174961337B47 for ; Tue, 8 Feb 2011 10:32:37 -0400 (AST) Received: from localhost ([127.0.0.1] helo=prod2) by prod2.officenet.no with esmtp (Exim 4.71) (envelope-from ) id 1PmocN-0008Ku-9Q for pgsql-jdbc@postgresql.org; Tue, 08 Feb 2011 15:32:35 +0100 Date: Tue, 8 Feb 2011 15:32:33 +0100 (CET) From: Andreas Joseph Krogh To: pgsql-jdbc@postgresql.org Message-ID: <18903054.82.1297175554326.JavaMail.on@prod2> In-Reply-To: <4D51443E.4020201@opencloud.com> Subject: Re: ResultSet.getClob() causing problems when used with JPA's @Lob MIME-Version: 1.0 User-Agent: Origo 1.8.9-SNAPSHOT X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.107 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RDNS_NONE=0.793 X-Spam-Level: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archive-Number: 201102/45 X-Sequence-Number: 21443 P=C3=A5 tirsdag 08. februar 2011 kl 14:25:18 skrev "Oliver Jowett" : > Andreas Joseph Krogh wrote: > > P=C3=A5 tirsdag 08. februar 2011 kl 13:31:21 skrev du: > >> Andreas Joseph Krogh wrote: > >> > >>> ...but the StringClobType is deprecated. > >> The obvious question here is "why?" > >=20 > > I totally agree that Hibernate is not behaving as it should when encoun= tering a String property annotated with @Lob. I just wanted to shed some li= ght on what rational PG has for implementing setClob() as it is and not jus= t as a wrapper for setString. >=20 > My point about the "why?" is that there was presumably some reason why=20 > it is deprecated and investigating what that reason is may be enlightenin= g. >=20 > > If I get it right the justification for it being as it is is not to bre= ak old apps, in case they use OID for large character types of data and not= varchar or text. I would be very surprised if any such applications still = exist... >=20 > Well, it's also arguably a more natural mapping of the CLOB type (go and= =20 > read the javadoc at=20 > http://download.oracle.com/javase/6/docs/api/java/sql/Clob.html; for=20 > "logical pointer" read "OID" and you essentially have the postgres=20 > implementation right there) >=20 > It's been this way for ages with no problems, it's a reasonable=20 > spec-compliant implementation, so you need a good argument for changing= =20 > it now. Your argument doesn't seem to go beyond "it doesn't do this=20 > non-standard thing I want it to do" which is not very convincing to me. To me the whole CLOB type seems to be superfluous and only exists to satisf= y RDBMS-vendors with broken(...) implementations of varchar/text-types. CLO= Bs really shouldn't be necessary these days. PG can and does better by allo= wing arbitrary length of text stored in varchar/text-columns. Feel free to = disagree. > If you do think it's useful to change then you need to discuss it with=20 > Kris since he's basically looking after the driver solo these days (I=20 > unfortunately have no time to spend on the driver any more, and even=20 > this list discussion has eaten up all my JDBC time for about the next=20 > month). I anticipate he'll be worried about breaking compatibility so=20 > you'll need a good argument there. I don't feel I'm in the position to push a new implementation of CLOB in th= e PG-JDBC-driver forward and don't want to waste anyones time any more on t= his issue. But - having this discussion has shed some light on the issue and might be = useful for archiving purpose if the CLOB issue some day resurrects. -- Andreas Joseph Krogh Senior Software Developer / CTO Public key: http://home.officenet.no/~andreak/public_key.asc ------------------------+---------------------------------------------+ OfficeNet AS | The most difficult thing in the world is to | Rosenholmveien 25 | know how to do a thing and to watch | 1414 Troll=C3=A5sen | somebody else doing it wrong, without | NORWAY | comment. | Org.nr: NO 981 479 076 | | | | Tlf: +47 24 15 38 90 | | Fax: +47 24 15 38 91 | | Mobile: +47 909 56 963 | | ------------------------+---------------------------------------------+