XML binary I/O (was Re: tsearch refactorings) - Mailing list pgsql-patches

From Heikki Linnakangas
Subject XML binary I/O (was Re: tsearch refactorings)
Date
Msg-id 46E12FBC.2080306@enterprisedb.com
Whole thread Raw
In response to Re: tsearch refactorings  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
Responses Re: XML binary I/O (was Re: tsearch refactorings)  ("Heikki Linnakangas" <heikki@enterprisedb.com>)
List pgsql-patches
Heikki Linnakangas wrote:
> BTW, the encoding of the XML datatype looks pretty funky. xml_recv first
> reads the xml string with pq_getmsgtext, which applies a client->server
> conversion. Then the xml declaration is parsed, extracting the encoding
> attribute. Then the string is converted again from that encoding (or
> UTF-8 if none was specified) to server encoding. I don't understand how
> it's supposed to work, but ISTM there's one conversion too much,

And it's got an unfortunate typo in it as well: it calls "free(result)"
instead of pfree. I think we need regression tests for the more complex
send/recv functions...

What's the difference between text and binary mode for something like
xml anyway? Could we just call the text format in/out functions and be
done with it?

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

pgsql-patches by date:

Previous
From: "Heikki Linnakangas"
Date:
Subject: Re: tsearch refactorings
Next
From: Simon Riggs
Date:
Subject: SET TRANSACTION conformance to SQL:2003