Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyAps-00042e-7h for pgsql-jdbc@arkaria.postgresql.org; Thu, 24 Jan 2013 00:38:32 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TyApr-0007fF-F3 for pgsql-jdbc@arkaria.postgresql.org; Thu, 24 Jan 2013 00:38:31 +0000 Received: from magus.postgresql.org ([87.238.57.229]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyApq-0007f7-LD for pgsql-jdbc@postgresql.org; Thu, 24 Jan 2013 00:38:30 +0000 Received: from lnk-66.i2rd.com ([173.244.141.66]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TyApm-0007PZ-EG for pgsql-jdbc@postgresql.org; Thu, 24 Jan 2013 00:38:28 +0000 Received: from [10.1.1.155] (rrcs-76-79-9-66.west.biz.rr.com [76.79.9.66]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by lnk-66.i2rd.com (Postfix) with ESMTPSA id B8FD219AA94 for ; Thu, 24 Jan 2013 00:38:23 +0000 (UTC) Message-ID: <51008284.3080202@i2rd.com> Date: Wed, 23 Jan 2013 18:38:28 -0600 From: Russ Tennant User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: XML document with doctype X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org Is there a way to persist XML data as a DOCUMENT as opposed to CONTENT (the default) without using SET XML OPTION / XMLPARSE? I'm using Hibernate and don't have control over building of the SQL for the PreparedStatement out of the box or when it executes to wrap calls to SET XML OPTION. For Hibernate, I'm using a UserType I wrote that uses SQLXML. In my case, I usually have XML content so it works fine in those cases; occasionally, I have a document to persist and then it will fail occasionally unless I tell PG that it is a document. I'm trying to find the best way to work with Hibernate when I have a document while minimizing the amount of Hibernate code I have to write. Before I delve into that, I wanted to make sure I wasn't missing any other options for passing along DOCUMENT/CONTENT info for converting from a string to an XML type. So, it looks like my options are: XMLPARSE (custom SQL) and SET XML OPTION. Are there any other options that I'm missing? Thanks for any help. -- Russ Tennant Software Engineer I2RD (Interactive Information R&D) Email: russ@i2rd.com -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc