Received: from maia.hub.org (unknown [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id A8A6C1337B91 for ; Sat, 23 Oct 2010 01:09:51 -0300 (ADT) 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 53907-03-2 for ; Sat, 23 Oct 2010 04:09:44 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [173.230.139.50]) by mail.postgresql.org (Postfix) with ESMTP id EBCD11337B74 for ; Sat, 23 Oct 2010 01:09:43 -0300 (ADT) Received: from localhost (localhost [127.0.0.1]) by www.postnewspapers.com.au (Postfix) with ESMTP id 9363688C; Sat, 23 Oct 2010 00:09:42 -0400 (EDT) X-Virus-Scanned: amavisd-new at postnewspapers.com.au.com Received: from www.postnewspapers.com.au ([127.0.0.1]) by localhost (www.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id XIbyKJTxI0Nq; Sat, 23 Oct 2010 00:09:41 -0400 (EDT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id 38025884; Sat, 23 Oct 2010 00:09:41 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id EF0D8AE9CD; Sat, 23 Oct 2010 12:09:39 +0800 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (mail.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 98lGirR0PXMC; Sat, 23 Oct 2010 12:09:34 +0800 (WST) Received: from [10.1.1.3] (203-206-12-135.dyn.iinet.net.au [203.206.12.135]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTPSA id E967DAE9CA; Sat, 23 Oct 2010 12:09:33 +0800 (WST) Message-ID: <4CC25FF7.7000308@postnewspapers.com.au> Date: Sat, 23 Oct 2010 12:09:27 +0800 From: Craig Ringer User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.14) Gecko/20101005 Thunderbird/3.0.9 MIME-Version: 1.0 To: Michael musset CC: Kris Jurka , pgsql-jdbc@postgresql.org Subject: Re: JDBC4 with SQLXML and postgresql-8.4-702.jdbc4.jar References: <4CBFF96E.1040800@ejurka.com> In-Reply-To: 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.91 tagged_above=-10 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201010/139 X-Sequence-Number: 21107 On 23/10/2010 11:53 AM, Michael musset wrote: > So, what I have to do ? > > i've tried to convert my xml into String but it still doesn't work : > > ret.updateString("DATA", myXmlString); > > > the error appear when i did a updaterow in my resultset > > > the error is: > > org.postgresql.util.PSQLException: ERROR: column "DATA" is of type xml > but expression is of type character varying > Hint: You will need to rewrite or cast the expression. It's one of those irritating areas where PostgreSQL's overzealous refusal to cast ::text or ::varchar for interpretation as literals of another type bites you. You need to use updateObject("DATA", java.sql.Types.SQLXML) so the JDBC driver knows what type to specify. -- Craig Ringer Tech-related writing at http://soapyfrogs.blogspot.com/