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 ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster