X-Original-To: pgsql-hackers-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 3AAE7D1D564 for ; Sat, 10 Jan 2004 23:04:09 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 64423-03 for ; Sat, 10 Jan 2004 19:03:40 -0400 (AST) Received: from fuji.krosing.net (217-159-136-226-dsl.kt.estpak.ee [217.159.136.226]) by svr1.postgresql.org (Postfix) with ESMTP id 05FCDD1B495 for ; Sat, 10 Jan 2004 19:03:31 -0400 (AST) Received: from fuji.krosing.net (localhost.localdomain [127.0.0.1]) by fuji.krosing.net (8.12.8/8.12.8) with ESMTP id i0AN36AT003674; Sun, 11 Jan 2004 01:03:06 +0200 Received: (from hannu@localhost) by fuji.krosing.net (8.12.8/8.12.8/Submit) id i0AN35m1003672; Sun, 11 Jan 2004 01:03:05 +0200 X-Authentication-Warning: fuji.krosing.net: hannu set sender to hannu@tm.ee using -f Subject: Re: Encoding problems in PostgreSQL with XML data From: Hannu Krosing To: Merlin Moncure Cc: Peter Eisentraut , pgsql-hackers@postgresql.org In-Reply-To: <303E00EBDD07B943924382E153890E5434AA48@cuthbert.rcsinc.local> References: <303E00EBDD07B943924382E153890E5434AA48@cuthbert.rcsinc.local> Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <1073775784.3542.3.camel@fuji.krosing.net> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 Date: Sun, 11 Jan 2004 01:03:04 +0200 X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/229 X-Sequence-Number: 48953 Merlin Moncure kirjutas R, 09.01.2004 kell 22:04: > 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'. IIRC, the charset transformations are done as a separate step in the wire protocol _before_ any parser has chance transform or not. The charset transform on incoming query are also agnostic of text contents - it just blindly transforms the whole SQL statement. --------------- Hannu