Re: Encoding problems in PostgreSQL with XML data - Mailing list pgsql-hackers

From Merlin Moncure
Subject Re: Encoding problems in PostgreSQL with XML data
Date
Msg-id 303E00EBDD07B943924382E153890E5434AA53@cuthbert.rcsinc.local
Whole thread Raw
In response to Encoding problems in PostgreSQL with XML data  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Encoding problems in PostgreSQL with XML data
List pgsql-hackers
Hannu Krosing wrote:
> I hope that real as-needed-column-by-column translation will be used
> with bound argument queries.
>
> It also seems possible to delegate the encoding changes to after the
> query is parsed, but this will never work for EBCDIC and other funny
> encodings (like rot13 ;).
>
> for these we need to define the actual SQL statement encoding on-wire
to
> be always ASCII.

In that case, treat the XML document like a binary stream, using
PQescapeBytea, etc. to encode if necessary pre-query.  Also, the XML
domain should inherit from bytea, not varchar.  The document should be
stored bit for bit as was submitted.  If we can do that for bitmaps, why
can't we do it for XML documents?

OTOH, if we are transforming the document down to a more generic format
(either canonical or otherwise), then the xml could be dealt with like
text in the ususal way.  Of course, then we are not really storing xml,
more like 'meta' xml ;)

Merlin


pgsql-hackers by date:

Previous
From: Dave Cramer
Date:
Subject: Re: failed to re-find parent key
Next
From: Jan Wieck
Date:
Subject: Re: VACUUM delay (was Re: What's planned for 7.5?)