From: | "Merlin Moncure" <merlin(dot)moncure(at)rcsonline(dot)com> |
---|---|
To: | "Peter Eisentraut" <peter_e(at)gmx(dot)net> |
Cc: | <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Encoding problems in PostgreSQL with XML data |
Date: | 2004-01-09 20:04:11 |
Message-ID: | 303E00EBDD07B943924382E153890E5434AA48@cuthbert.rcsinc.local |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Peter Eisentraut wrote:
> The central problem I have is this: How do we deal with the fact that
> an XML datum carries its own encoding information?
Maybe I am misunderstanding your question, but IMO postgres should be
treating xml documents as if they were binary data, unless the server
takes on the role of a parser, in which case it should handle
unspecified/unknown encodings just like a normal xml parser would (and
this does *not* include changing the encoding!).
According to me, an XML parser should not change one bit of a document,
because that is not a 'parse', but a 'transformation'.
> Rewriting the <?xml?> declaration seems like a workable solution, but
it
> would break the transparency of the client/server encoding conversion.
> Also, some people might dislike that their documents are being changed
> as they are stored.
Right, your example begs the question: why does the server care what the
encoding of the documents is (perhaps indexing)? ZML validation is a
standardized operation which the server (or psql, I suppose) can
subcontract out to another application.
Just a side thought: what if the xml encoding type was built into the
domain type itself?
create domain xml_utf8 ...
Which allows casting, etc. which is more natural than an implicit
transformation.
Regards,
Merlin
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2004-01-09 20:44:14 | Re: Encoding problems in PostgreSQL with XML data |
Previous Message | Rod Taylor | 2004-01-09 19:21:50 | Re: Encoding problems in PostgreSQL with XML data |