Re: raw output from copy
От | Pavel Stehule |
---|---|
Тема | Re: raw output from copy |
Дата | |
Msg-id | CAFj8pRD2BY-gkbUBsGF=WYb_tCVPTiBZe35VCoJX8EXF0Qh1Ng@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: raw output from copy (Peter Eisentraut <peter_e@gmx.net>) |
Список | pgsql-hackers |
<p dir="ltr">It would be nice, but it is not true. You can get correct non utf8 xml with encoding specification only whenbinary mode is used. Psql doesn't support binary mode.<p dir="ltr">Regards<p dir="ltr">Pavel<div class="gmail_quote">Dne15. 4. 2015 22:06 napsal uživatel "Peter Eisentraut" <<a href="mailto:peter_e@gmx.net">peter_e@gmx.net</a>>:<brtype="attribution" /><blockquote class="gmail_quote" style="margin:00 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 4/10/15 5:26 PM, Pavel Stehule wrote:<br /> >Hi<br /> ><br /> > I wrote a prototype of this patch, and it works well<br /> ><br /> > postgres=# set client_encodingto 'latin2';<br /> > SET<br /> > Time: 1.488 ms<br /> > postgres=# \copy (select xmlelement(namexx, d) from d) to ~/d.xml<br /> > (format 'raw')<br /> > COPY 1<br /> > Time: 1.108 ms<br /> >postgres=# copy (select xmlelement(name xx, d) from d) to stdout (format<br /> > 'raw') ;<br /> > <?xml version="1.0"encoding="LATIN2"?><xx>příliš žluťoučký<br /> > kůň</xx>Time: 1.000 ms<br /><br /> I thinkyou can get the same thing using regular psql output and just<br /> turning off all field and record separators andtuple headers and so on.<br /><br /></blockquote></div>
В списке pgsql-hackers по дате отправления: