pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Russ Tennant <russ@i2rd.com>
To: pgsql-jdbc@postgresql.org
Subject: XML document with doctype
Date: Wed, 23 Jan 2013 18:38:28 -0600
Message-ID: <51008284.3080202@i2rd.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>

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



view thread (3+ messages)  latest in thread

Message-ID: <51008284.3080202@i2rd.com>
Permalink:  ../51008284.3080202@i2rd.com/
Also on:    postgresql.org/message-id/51008284.3080202@i2rd.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: russ@i2rd.com
  Subject: Re: XML document with doctype
  In-Reply-To: <51008284.3080202@i2rd.com>
  References: <51008284.3080202@i2rd.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox