Received: from localhost (unknown [200.46.204.184]) by postgresql.org (Postfix) with ESMTP id 7870D2E0207 for ; Fri, 14 Dec 2007 16:16:40 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 22178-08 for ; Fri, 14 Dec 2007 16:16:33 -0400 (AST) Received: from fep01.xtra.co.nz (fep01.xtra.co.nz [210.54.141.245]) by postgresql.org (Postfix) with ESMTP id 8C3452E0214 for ; Fri, 14 Dec 2007 16:16:36 -0400 (AST) Received: from mta04.xtra.co.nz ([172.23.11.41]) by fep01.xtra.co.nz with ESMTP id <20071214201634.TXOF29570.fep01.xtra.co.nz@mta04.xtra.co.nz>; Sat, 15 Dec 2007 09:16:34 +1300 Received: from fep03.xtra.co.nz ([172.23.12.31]) by mta04.xtra.co.nz with ESMTP id <20071214201634.IVKB28381.mta04.xtra.co.nz@fep03.xtra.co.nz>; Sat, 15 Dec 2007 09:16:34 +1300 Received: from x1000.msqr.us ([125.236.166.246]) by fep03.xtra.co.nz with ESMTP id <20071214201633.YLIU18083.fep03.xtra.co.nz@x1000.msqr.us>; Sat, 15 Dec 2007 09:16:33 +1300 Received: from x1000.msqr.us (x1000.msqr.us [127.0.0.1]) by x1000.msqr.us (8.13.1/8.13.1) with ESMTP id lBEKGMKH018070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 15 Dec 2007 09:16:23 +1300 Received: (from apache@localhost) by x1000.msqr.us (8.13.1/8.13.1/Submit) id lBEKGCAt018069; Sat, 15 Dec 2007 09:16:12 +1300 Received: from 192.168.1.108 (SquirrelMail authenticated user matt) by msqr.us with HTTP; Sat, 15 Dec 2007 09:16:12 +1300 (NZDT) Message-ID: <49230.192.168.1.108.1197663372.squirrel@msqr.us> In-Reply-To: References: <51046.192.168.1.108.1197434523.squirrel@msqr.us> <50753.192.168.1.108.1197501684.squirrel@msqr.us> <50997.192.168.1.108.1197506381.squirrel@msqr.us> <59655.192.168.1.108.1197614334.squirrel@msqr.us> Date: Sat, 15 Dec 2007 09:16:12 +1300 (NZDT) Subject: Re: how to set a PreparedStatement column of XML type in 8.3? From: "Matt Magoffin" To: "Kris Jurka" Cc: pgsql-jdbc@postgresql.org User-Agent: SquirrelMail/1.4.8-4.0.1.el4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/122 X-Sequence-Number: 17977 >> Do you think it's worth considering having the 8.3 driver do this >> automatic conversion of String <-> xml, so that users don't have to use >> PGObject or set the stringtype=unspecified connection parameter? > > The driver can't really do that. At the time you say setString, the > driver doesn't know that the real target type is xml, so the driver's only > options are to set the parameter type to varchar (String) or unknown (the > unspecified URL parameter). > > Kris Jurka What about with calls to setObject(int, Object, int) when a String is passed in and the type set to Types.OTHER? Would it be possible then... say if Object is a String, to treat it as if the stringtype=unspecified parameter was set? I apologize if these are obvious questions, I'm just bouncing ideas around. -- m@