Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id DBAB52E2F04 for ; Fri, 14 Dec 2007 02:39:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 98085-08 for ; Fri, 14 Dec 2007 02:39:06 -0400 (AST) Received: from mta02.xtra.co.nz (mta02.xtra.co.nz [210.54.141.253]) by postgresql.org (Postfix) with ESMTP id 9BFB82E2DCE for ; Fri, 14 Dec 2007 02:39:04 -0400 (AST) Received: from fep04.xtra.co.nz ([172.23.12.41]) by mta02.xtra.co.nz with ESMTP id <20071214063902.TFMX5650.mta02.xtra.co.nz@fep04.xtra.co.nz>; Fri, 14 Dec 2007 19:39:02 +1300 Received: from x1000.msqr.us ([125.236.166.246]) by fep04.xtra.co.nz with ESMTP id <20071214063901.DABA17371.fep04.xtra.co.nz@x1000.msqr.us>; Fri, 14 Dec 2007 19:39:01 +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 lBE6d0Yx013802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Dec 2007 19:39:01 +1300 Received: (from apache@localhost) by x1000.msqr.us (8.13.1/8.13.1/Submit) id lBE6csnN013801; Fri, 14 Dec 2007 19:38:54 +1300 Received: from 192.168.1.108 (SquirrelMail authenticated user matt) by msqr.us with HTTP; Fri, 14 Dec 2007 19:38:54 +1300 (NZDT) Message-ID: <59655.192.168.1.108.1197614334.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> Date: Fri, 14 Dec 2007 19:38:54 +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/110 X-Sequence-Number: 17965 >> It was hardly a complaint, just a question about how one is expected to >> handle the xml type via JDBC in the current version of the driver. > > That may have came out a little wrong. I just was trying to point out > that expected and should have different meanings depending on what you're > asking. As a user of the JDBC API you should expect the driver to > correctly map the xml type to SQLXML. As a user of the current pg jdbc > driver code you would not expect it to return SQLXML because it hasn't > been implemented, so it's not that you just need to tweak something to get > it to work. Sorry if it came out in a negative way. Yes, that makes sense, thanks. I suppose I was "expecting" the driver for 8.3 to simply handle a Java String <-> Postgres xml type automatically, simply because the xml type in Postgres is sort of a glorified text type (at the moment)... and as a user of Postgres databases that store XML data as simple text columns, was investigating what it would be like to switch those over to the xml type in 8.3. 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? As a user, it definitely has benefits for ease of use, but I understand there might be good reasons not to do this. -- m@