Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CC5811337B5E for ; Tue, 8 Feb 2011 20:27:39 -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 81125-08 for ; Wed, 9 Feb 2011 00:27:34 +0000 (UTC) X-Greylist: delayed 00:06:57.338287 by SQLgrey-1.7.6 Received: from mail63.csoft.net (mail63.csoft.net [205.205.214.4]) by mail.postgresql.org (Postfix) with ESMTP id 6A92A133655C for ; Tue, 8 Feb 2011 20:27:32 -0400 (AST) Received: from mail63.csoft.net (localhost [127.0.0.1]) by mail63.csoft.net (Postfix) with ESMTP id 99B8D2840D; Tue, 8 Feb 2011 19:20:33 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=csoft.net; h=date:from:to :cc:subject:in-reply-to:message-id:references:mime-version :content-type; s=sel1; bh=oglLyMIurlcSDr2N4LToNZkHChk=; b=mqVEhZ o0A0aOOpUNbUm16GF5bNYa7kSKK7eZDAgSH4Qaac76FRdjllHSLr39BAngtaLfqR uPg8LGy18VOSFIPtLQAybD47Sifw6zc/XV7jlgYl3ayFLKGr9e1Vj7IMGxUsJjLc s3tvfQhabngxvhGgWfj0XAfLaAL8LNNsWXKf8= Received: from leary.csoft.net (leary.csoft.net [205.205.214.5]) by mail63.csoft.net (Postfix) with ESMTP id 67CAF28406; Tue, 8 Feb 2011 19:20:33 -0500 (EST) Received: by leary.csoft.net (Postfix, from userid 1112) id E81FBA3A9; Tue, 8 Feb 2011 19:20:32 -0500 (EST) Date: Tue, 8 Feb 2011 19:20:32 -0500 (EST) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: Andreas Joseph Krogh cc: pgsql-jdbc@postgresql.org Subject: Re: ResultSet.getClob() causing problems when used with JPA's @Lob In-Reply-To: <4D505B02.804@officenet.no> Message-ID: References: <201102070001.22259.andreak@officenet.no> <201102070911.20245.rsmogura@softperience.eu> <4D505B02.804@officenet.no> User-Agent: Alpine 2.00 (BSO 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201102/50 X-Sequence-Number: 21448 On Mon, 7 Feb 2011, Andreas Joseph Krogh wrote: > It's not clear to me why the JDBC-driver for PG shouldn't just use > rs.getString() internally for getClob() calls? Requiring > special-handling in Hibernate for dealing with Strings by setting an > obscure property just doesn't seem right. And I don't want to set a > property to handle CLOB which might affect how I use BLOBs. > The problem is that we have no idea what someone might want to do with a CLOB after they've fetched it. You're coming from the idea that all they want to do is read it and copy the data out to a String. From that perspective it's not hard to have a Clob wrapper around a String, but what happens when they say clob.setString(13, "data")? Are we going to try and figure out what row of what table that varchar column is coming from and do a partial update on it? Kris Jurka